Usefull Unix/Linux Commands for web hosting

Structure of *NIX Commands

  • command -option arguments
  • Examples:
    • ls
    • ls -al
    • ls -al sites/
    • cp -R temp/sites/ website
    • tar -czvf file.tar.gz source.c source.h

Meanings of Various Glyphs

. (period) Current directory
also:indicates hidden files (.htaccess)
.. (two periods) one level up
~ (tilde) home directory
/ show directory structure
(e.g. sites/all or /usr/bin)
* Wildcard – “everything”

Often-Used Commands

ls -al List current directory (all files, long format)
cd target Change your location to another directory
cp source target Copy files (often with -R)
mv source target Move files
rm target Delete (“remove”, often with -R)
wget URL Get (usually to retrieve a file from a web site)
tar source Compress (-cvf) / uncompress (-xzvf) files
mkdir name Create a directory
nano name Edit a file (also emacs, vi, vim, picoo…)
Posted in Technology/Computers Tagged with: