Many people are now using either dedicated boxes or virtual dedicated hosting. Knowing your way around the filesystem and how to manipulate it is key to running a good, stable, secure service. It also makes takes as a website owner much easier and quicker.
Here is a list of common Linux and/or UNIX commands which may come in handy:
Files and Folders:
cd - change directory. E.g. cd /home will take you into the “home directory”
cp - copy. E.g cp readme.txt /home/user would copy the text file to the user directory
mv - move. E.g mv readme.txt /home/user/readme.txt would move the file (can also be used to rename the file: mv readme.txt readme2.txt)
mkdir - make a new directory. E.g mkdir /home/user/new_folder would create the directory “new_folder”
rm - remove/delete. E.g rm readme.txt would delete readme.txt. To prevent prompting (are you sure?…) you would use rm -rf. This would also be used to remove an empty directory (if the directory had files in it you would have to use rm -rf)
rmdir - remove directory. E.g rmdir /home/user/new_folder would remove the directory “new_folder”
Zipping/Tarring/bzipping:
To tar/gzip a file: cd /your/files/location “tar zxvf filename.tar.gz” or “tar zxvf filename2.tgz”
To untar a *.tar: cd /your/file/location “tar xvf filename.tar”
To unzip a *.gz (gzip): cd /your/file/location “gzip -d filename.gz”
To unzip a *.bz2 (bzip2): cd /your/file/location “bzip2 -d filename.bz2″
If you would like to know how to do anything in particular on your system, feel free to ask in comments/email and I will get it added.












November 10th, 2007 at 2:08 pm
[...] read more | digg story [...]
May 11th, 2008 at 10:19 am
[...] [...]