Linux Cmds
Linux Cmds
Example:
grep myname biodata
• Here biodata is file and myname is specific pattern for searching in
biodata file
chmod
• This command changes the permission information associated with a
file.
www.lpu.in Lovely Professional University
15
Mkdir
• The mkdir command is used to create (or make) a directory.
• Example:
• # mkdir LPUCSE
rmdir
• The rmdir directory is used to remove directories, but only those that are
empty (i.e., contain no files or subdirectories). In order to delete a directory
with actual contents, you must use the rm -R command.
• Example
• To remove an empty directory:
• # rmdir /mike
Pwd
Simply type pwd into your terminal, and the command will output the
absolute path of your print working directory.
The pwd command writes to standard output the full path name of your
current directory (from the root directory). All directories are separated by
a / (slash). The root directory is represented by the first /, and the last
directory named is your current directory.
The ps command, short for Process Status, is a command line utility that is
used to display or view information related to the processes running in a
www.lpu.in
Linux system. Lovely Professional University
17
ps
The ps command, short for Process Status, is a command line utility that is
used to display or view information related to the processes running in a
Linux system.
kill
kill command in Linux (located in /bin/kill), is a built-in command which is
used to terminate processes manually.