Here are some linux commands to remember.
pwd Check the current directory path
$ pwd
cat Display the contents of the specified file
$ cat test.txt
less Display the contents of the specified file
$ less test.txt
operation | Key |
---|---|
Go to the next page | space |
Go back to the previous page | b |
Return to the original command screen | q |
grep Search for strings in files that meet the specified conditions
$ grep "test" *.txt
find Search for files and directories that meet the specified conditions in the specified directory.
$ find . -name "*.js"
ifconfig View current network interface settings
$ ifconfig
ping Check network communication with the specified address
$ ping www.google.com
nslookup Get network data of IP or domain of specified address
$ nslookup www.google.com
netstat Check the current communication connection status
$ netstat
ps View running processes
$ ps aux
kill Forcibly terminates the process with the specified process ID
$ kill -9 5859
Process the command execution result by passing it to another command
$ ls | less
Output the command execution result to another file
$ ls > test.txt
Output the file list under the current directory
$ ls -d $(find `pwd`)
Recommended Posts