Command
| Description
|
cd | Return to your home directory |
cd .. | Move one directory level up |
cd <directory name> | Move to the directory with name <directory name> |
chmod ugw <filename> | Change file rights. Ugw is an octal number defining the file/directory rights for the user, group and/or world. Example: 755 (rwxr-xr-x) means user has full rights, group and world are only allowed to read and execute. |
cp <source> <destination> | Copy file <source> to file <destination> |
finger <username> | Find out more about a user with the name <username> |
grep string filename | Looks for a string in a filename |
kill -9 <process number> | Kill (stop) process with number <process number>. Use the ps command to find the process number of the job you want to stop. |
ls | Show the content of your current directory |
ls -al | Show the content of your current directory, extensively |
man <command> | Show manual page of <command> |
mkdir <directory name> | Create a directory named <directory name> |
more <filename> | Show content <filename> page by page. Press Space bar for next page, q to quit. |
mv <source> <destination> | Move file <source> to file <destination> |
passwd | Change your password |
pwd | Show current working directory |
ps | Show running processes |
ps -af | Show all running processes. Note: option -af might differ on different Unix OS flavors. |
rm <filename> | Remove a file |
rmdir <directory> | Remove a directory |
set | Show environment settings |
tar -cf <archivename>.tar directory | Create archive from directory. Example: tar -cf test.tar ./cars/ |
tar -tf <archivename>.tar | List archive without extracting. |
tar -xvf <archivename>.tar | Extract tar archive |
top | Show constantly all running processes |
vi <filename> | Edit <filename>. Press Esc:wq to save the file and exit the Vi-editor. |
| |
Find a string in files | find . | xargs grep 'string' -sl The -s is for summary and won't display warning messages such as grep: ./directory-name: Is a directory. The -l is for list, so we get just the filename and not all instances of the match displayed in the results. |