Professional Documents
Culture Documents
Assignment 1 Study of Linux Commands
Assignment 1 Study of Linux Commands
1. ls command
This command is used to list the contents of a specified directory.
a. ls -a
It shows all the hidden files in the directory
b. ls p
c. ls r
It lists all the files in reverse order
d. ls t
It sorts the files by their modification time, showing the last edited file
first.
e. ls s
It lists file size with the file names
2. touch command
It is used to create an empty file. This command is also used to change the
last modification and access time of a specified file into specified time.
Example: touch file <filename> touch MMDDHHmm <filename>
file f1.txt touch 062209
3. ps command
This command is used to know which processes are running at our terminal
a. ps -this will list all the processes of all the users who are logged into
the system
b. ps -x list all system process
c. ps -u list all processes of specified user
d. ps -t list all processes of specified terminal
5. at command
It is used to execute the specified linux command at a specified future time (at
12:00 excho "unch")
7. who command
It will display the list of users logged in to system currently
8. who am i command
It tells you, who you are, working on current terminal
9. man command
It gives the manual book of succeeding command
10. cal
It displays calendar of the specified month and year
12. bc command
It helps you work on a basic calculator
a. ibase command
It defines the base of input base value for a specific number
Example: $ echo 'ibase=16; FEF33D9' | bc
267334617
b. obase command
It defines the base of output base value for a specific number
Example: echo "obase=2; 23" | bc
10111
17. tr command
It is used for translating characters. It supports a range of transformations
including uppercase to lowercase, squeezing repeating characters, deleting
specific characters and basic find and replace.
xxx---xxx