Home > Operating Systems > Misc Bash Scripts

Misc Bash Scripts

Here are a few little bash scripts that i use to do different things on my ubuntu machine.  I can’t always remember them, so I have to write them down somewhere. Hopefully someone else will find these useful too.  Visit ubuntu-tutorials.com for some other command line basics.

  • Activate the screensaver
gnome-screensaver-command --activate
  • Call the screensaver and lock the computer
gnome-screensaver-command --lock
  • Save the directory listing to a file in the home folder
ls > ~/FileName.txt
  • List files recursively
find /path/to/search/ -type f -name "*.nfo" -exec ls -f {} \;
  • Delete files recursively
find /path/to/search/ -type f -name "*.nfo" -exec rm -f {} \;
Categories: Operating Systems Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.