update-rc.d -f program_name remove
To add again run the command:
update-rc.d -f program_name default
blkid or blkid /dev/sda1
tune2fs -l /dev/sdb1
lshw -class disk
ls -la /dev/disk/by-uuid
lsof -i :port will show the process running on this port.
lsof -U for linux open sokets.
lsof -i for network sockets
lsof -i tcp listing open tcp ports.
lsof -c c will show open processes starting with c.
lsof +d s list all directories s.
losf -N This option selects the listing of NFS files.
lsof -R This option directs lsof to list the Parent Process IDentifiā
cation number in the PPID column.
Run the netstat command to show occupied ports:
netstat -tulpn
The above command will show the pid of process listening on port, run the command below to show the program:
ls -l /proc/pid_of_process/exe
The command fuser will show the user using this file read the man of fuser fro more details.
raync -uvEr /a ./
The command below will sync two a local directories:
rsync -uvEr --delete /a/ a
To sync two remote dirs:
rsync -v -u -P -s -z --rsh=/usr/local/bin/ssh \
--r--times --perms --links --delete \
--exclude "*bak" --exclude "*~" \
/www/* webserver:simple_path_name
For local dirs don't uset the -z (--compress).
rasync -av --exclude-from=FILE --include-from=FILE --files-from=FILE
Top
nmap -osS 192.168.1.0/24
To save the ouput in a file run:
namp -sX localhost | egrep -v '^(Namp|Starting)' > nmap.ouput
Top
skill -STOP pts/2
To release:
skill -CONT pts/2\
To kill user bash:
pkill -KILL -u username bash
Top