Different Set of command utilities - Part 2
Posted: Mon Jan 19, 2015 11:21 am
Hi,
Listing:
# lsblk [Lists Block Devices]
# lsblk -l [Not a tree structure]
Searching already executed command:
Pressing “Ctrl + R” and then search for already executed commands which lets your command to be completed with auto completion feature.
Tar commands:
# tar -zxvf abc.tar.gz (Remember 'z' for .tar.gz) [extracting an archive]
# tar -jxvf abc.tar.bz2 (Remember 'j' for .tar.bz2) [extraction an archive]
# tar -cvf archieve.tar.gz(.bz2) /path/to/folder/abc [creating an archive]
SCP commands:
Note: .(dot) indicates that you want to transfer file to the current directory.
# scp source_file_name username@destination_host:destination_folder
# scp -v Label.pdf mrarianto@202.x.x.x:. [-v option to print copy process...]
# scp -Cpv messages.log mrarianto@202.x.x.x:. [-p shows the estimated time to copy and -C compresses the file within the netwok and reduces the tranfer time.]
# scp -P 2249 Label.pdf mrarianto@202.x.x.x:. [scp uses default port as 22..but you can change it to some other ports for security reasons]
# scp -r documents mrarianto@202.x.x.x:. [-r option to copy files inside directory recursively.]
Networking:
# ifconfig eth0 down
# ifconfig eth0 up
# ifconfig eth0 192.168.1.12
# ifconfig eth0 netmask 255.255.255.
# ifconfig eth0 broadcast 192.168.1.255
# ifconfig eth0 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
# netstat -a [List All Network Ports]
# netstat -at [List All TCP Ports]
# netstat -s [Show Statistics for All Ports]
# tcpdump -c 5 -i eth0 [Capture Only N Number of Packets]
# tcpdump -A -i eth0 [Print Captured Packets in ASCII]
# tcpdump -D [Display Available Interfaces]
# tcpdump -w 0001.pcap -i eth0 [Capture and Save Packets in a File]
# tcpdump -r 0001.pcap [Read Captured Packets File]
Listing:
# lsblk [Lists Block Devices]
# lsblk -l [Not a tree structure]
Searching already executed command:
Pressing “Ctrl + R” and then search for already executed commands which lets your command to be completed with auto completion feature.
Tar commands:
# tar -zxvf abc.tar.gz (Remember 'z' for .tar.gz) [extracting an archive]
# tar -jxvf abc.tar.bz2 (Remember 'j' for .tar.bz2) [extraction an archive]
# tar -cvf archieve.tar.gz(.bz2) /path/to/folder/abc [creating an archive]
SCP commands:
Note: .(dot) indicates that you want to transfer file to the current directory.
# scp source_file_name username@destination_host:destination_folder
# scp -v Label.pdf mrarianto@202.x.x.x:. [-v option to print copy process...]
# scp -Cpv messages.log mrarianto@202.x.x.x:. [-p shows the estimated time to copy and -C compresses the file within the netwok and reduces the tranfer time.]
# scp -P 2249 Label.pdf mrarianto@202.x.x.x:. [scp uses default port as 22..but you can change it to some other ports for security reasons]
# scp -r documents mrarianto@202.x.x.x:. [-r option to copy files inside directory recursively.]
Networking:
# ifconfig eth0 down
# ifconfig eth0 up
# ifconfig eth0 192.168.1.12
# ifconfig eth0 netmask 255.255.255.
# ifconfig eth0 broadcast 192.168.1.255
# ifconfig eth0 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
# netstat -a [List All Network Ports]
# netstat -at [List All TCP Ports]
# netstat -s [Show Statistics for All Ports]
# tcpdump -c 5 -i eth0 [Capture Only N Number of Packets]
# tcpdump -A -i eth0 [Print Captured Packets in ASCII]
# tcpdump -D [Display Available Interfaces]
# tcpdump -w 0001.pcap -i eth0 [Capture and Save Packets in a File]
# tcpdump -r 0001.pcap [Read Captured Packets File]