lsof - list open files
!{command} ; last command
vi !$ ; last argument
!! ; last command
"CTRL+R" for Repeating the Last Matching Command
history | grep "keyword"
egrep "ERROR|Exception" *.xml
grep Exception logfile.txt | grep -v ERROR
grep -c "Error" logfile.txt
grep --context=6 successful logfile.txt
grep 'Error|Exception' logfile.txt
grep -i Error logfile.txt
zgrep -i Error *.gz
grep -w ERROR logfile.txt ; search whole word
grep -l ERROR *.log ; display file name which contains pattern
Using Alias .bashrc or .profile
pushd, popd, cd --- and cd ~ command. cd --- is best
Ctrl+Z to suspend it and fg 1 or fg 2
https://dev.to/javinpaul/10-simple-linux-tips-which-save-50-of-my-time-in-the-command-line-4moo
• finding host/domain name and IP address - hostname
• test network connection – ping
• getting network configuration – ifconfig
• Network connections, routing tables, interface statistics – netstat
• query DNS lookup name – nslookup
• communicate with another hostname – telnet
• outing steps that packets take to get to network host – traceroute
• view user information – finger
• checking status of destination host - telnet
hostname with no options displays the machine's hostname
hostname –d displays the domain name the machine belongs to
hostname –f displays the fully qualified host and domain name
hostname –i displays the IP address for the current machine
netstat -nap | grep port #will display process id of application which is using that port
netstat -a or netstat –all #will display all connections including TCP and UDP
netstat --tcp or netstat –t #will display only TCP connection
netstat --udp or netstat –u #will display only UDP connection
netstat -g #will display all multicast network subscribed by this host.
nslookup blogger.com # find IP address of the SITE
#A handy utility to view the number of hops and response time to get to a remote system or website is traceroute
traceroute
#View user information, displays a user’s login name, real name, terminal name and write status.
#this is pretty old Unix command and rarely used nowadays.
finger
Read more: https://javarevisited.blogspot.com/2010/10/basic-networking-commands-in-linuxunix.html#ixzz5x4Ghj3Gd
'Programming' 카테고리의 다른 글
FFMPEG GUI frontend tool (0) | 2019.08.21 |
---|---|
FFMPEG으로 비디오 붙이기 (0) | 2019.08.20 |
Ubuntu upgrade 18.10 -> 19.04 (0) | 2019.08.15 |
핸드폰 비디오 rotate하기 (0) | 2019.08.14 |
FFMPEG으로 비디오 파일에서 10초만 짤라서 만들기 (0) | 2019.08.13 |