The Essentials
Terminal windows are your view onto our Unix file system. Learn to get around this system and manage your files with the commands in the following sections.
pwd Path of Working Directory This command returns the name of your current directory. Just run "pwd".
ls LiSt directory This command lists the files in a particular directory. For the files in your current directory, simply run "ls". For a specific directory, run "ls dir". To list all files, including hidden ones, run "ls -a".
cd Change Directory This command moves among directories. For a specific directory, run "cd dir". For your home directory, run "cd ~". To move up one directory, run "cd ..".
cp CoPy To copy a file to a different directory, run "cp source-file target-dir". To copy an entire directory, run "cp -r source-dir target-dir".
mv MoVe To move a file or directory to a different location, run "mv source target".
rm ReMove To remove a file, run "rm file". To remove a directory, run "rm -r dir".
mkdir MaKe DIRectory To make a directory, run "mkdir dir".
Browse text file To view a text file, run "more/less text-file". "more" only scrolls forwards, while "less" also scrolls backwards.
Further Details
For further details on all commands (including the ones listed above), run "man command". This brings up MANual pages for the specified command.
Last Updated: April 29, 2005, 12:08 AM
Questions or comments? Email mconsult.