Rob DiNardo - Web Development Tips

Home › Blogs › Rob's blog

Useful Linux Commands

Rob — November 28, 2010 - 22:37

This blog entry is going to be my collection of useful Linux commands that I wish to refer back to in the future. I hope you find them useful as well.

Apache 2, Restart, Stop, Start on Ubuntu Linux

sudo /etc/init.d/apache2 restart

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 restart

Finding files

Find all files in the home folder (and its subfolders) with a 'txt' extension, sort the results, then output to a file:

find /home -name '*.txt' | sort >> text-files.txt

Renaming files

The following will rename the extension of all files in the current working directory from 'avi' to 'AVI':

rename 's/\.avi/.AVI/' *.avi

  • Linux
  • Shell
  • Rob's blog
  • Login to post comments

User login

  • Request new password

Code

  • WordPress Plugins