'cli'에 해당되는 글 1건

  1. 2019.08.20 10 simple Linux tips in the command line
Programming2019. 8. 20. 02:11

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

 

10 simple Linux tips which save 50% of my time in the command line

My favorite Linux commands, tips, and tricks to work fast in the UNIX terminal. Every programmer or Linux user should know this to save time and typing.

dev.to

 

 

• 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

Posted by 쁘레드