Sunteți pe pagina 1din 1

BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI (RAJ.

)
CS F111 Computer Programming
UNIX COMMANDS CHEAT SHEET

# Command Action Accomplished


1 clear Clear screen
2 date Displays the current date and time
who Displays the list of all users logged in
3
who am i Displays your own username and details

4 cal Calendar – also takes arguments


Displays the user manual entry for the command
5 man <command>
mentioned
If used with filename(s), displays the contents of the
6 cat
file(s); also used to create new files
Display the complete path of the directory you are
7 pwd
currently positioned in
Change directory to the one whose location is
8 cd specified, or to home directory, if nothing is
mentioned
List the contents of the directory; often used with the
9 ls
–a (all) and –l (long listing) options
Create a subdirectory under the current working
10 mkdir <dir_name>
directory
11 logout Logs you out of the system
Displays whatever follows to the standard output
12 echo
(screen)
Copies the source file into destination (destination
13 cp <source> <dest>
can be file or directory)
14 mv <source> <dest> Rename the source file as destination

Remove the file(s) given as arguments; can also be


15 rm <file> used with the –rf option to remove a directory that is
non-empty
Displays word, character and line count of the file (or
16 wc
standard input)
17 head Displays the first few lines of a file
18 tail Displays the last few lines of a file
Search for the given pattern and print those lines that
19 grep
have that pattern
chmod <permissions> Change permissions of a file
20
<filename>

S-ar putea să vă placă și