Professional Documents
Culture Documents
1. Mv source desti
2. Mv file1 file2 dir
3. Mv dir1 dir2
4. Wc filename
5. Wc l file name
6. Wc w filename
7. Wc c filename
The file systems
1. Cmp file1 file2
If different files, then
File1 file 2 differ: char 10, line 1
Identical file, then
$_
File attribute
1. Ls l : listing file with attribute
Attributes:
File type and permissions
Links
Ownership
Group ownership
Size
Last modified time
File name
File attribute
1. Ls ld dir : list file details in dir
2. $id : disp user id
File permissions
rwx all three, read, write and execute
r-x read and execute
r-- - only read
Types of Processes:
Foreground Processes: They run on the screen and
need input from the user. For example Office
Programs
Background Processes: They run in the background
and usually do not need user input. For example
Antivirus.
Process utilities
By default, every process that you start runs in the
foreground. It gets its input from the keyboard and
sends its output to the screen.
Ls -command
Process utilities
UID- User ID that this process belongs to (the
person running it)
PID-Process ID
PPID-Parent process ID (the ID of the process that
started it)
C-CPU utilization of process
STIME-Process start time
TTY-Terminal type associated with the process
TIME- CPU time taken by the process
Process utilities
Stopping Processes
use the kill command to kill the process
$ kill PID
Parent and Child Processes
Each unix process has two ID numbers assigned to
it: The Process ID (pid) and the Parent process
ID (ppid). Each user process in the system has a
parent process.
Process utilities
a zombie process is a process that has completed
execution (via the exit system call) but still has an
entry in the process table: it is a process in the
"Terminated state".
An orphan process is a computer process whose
parent process has finished or terminated, though
it remains running itself.
Disk utilities
1.Du -To find out the disk usage summary of
a /home/tecmint directory tree and each of its sub
directories.
2.Du h : Using -h option with du command
provides results in Human Readable Format.
Means you can see sizes
in Bytes, Kilobytes, Megabytes, Gigabytes etc.
3. du-s : To get the summary of a grand total disk
usage size of an directory use the option -s
Disk utilities
4. du a: Using -a flag with du command
displays the disk usage of all the files and
directories.
5. du-ah : Using -a flag along with -h displays
disk usage of all files and folders in human
readeable format.
6. 6. du k: Find out the disk usage of a directory
tree with its subtress in Kilobyte blcoks. Use the
-k
Networking utilities
1. The ping command sends an echo request to a
host available on the network.
$ping hostname or ip-address