Familiar with the basic commands linux bash

ls: list the current directory is equivalent to the win the dir
Kali bshell using the following default:
blue white represents the directory file represented by ordinary red green indicates executable archive
-l long file shown in the first column of the first letter d indicates a directory c l represents a device file indicates that the connection - indicates that the file b represents fast
-a show hidden files
-h to display easy to read manner
-sort sort = time = size Sort by size
cd: cd into the directory with to win
. into the current directory
... the higher the current directory directory
pwd: View the current working directory ~ indicates the user's home directory (root directory)
CAT / path: displays the entire contents of the text type
more / path: according to the current window display file contents, only a page-by-screen view
less / path: similar More
tail / path: the default display last 10 lines of the file - the number of rows
watch -n number command: no number of seconds behind execute a command
rm file name: delete the file
-r: delete the directory
cp filename [new file name]: copy files
-r: copy the directory /
pid: view the process
kill the process: kill the process
q: quit pid
PS: view the process
-ef
the AUX
grep: filter output content plus Version eqrep
ifconfig NIC up / down: on / off card
netstat -pantu: View and UDP address of the locally generated TCP connection
Example: netstat -pantu | egrep -v '0.0.0.0 | :::' | awk '{print $ 5}' | egrep -v 'and | the Address'
| cut -d ':'. 1 -f | sort | uniq> IP
Note: | awk truncated column pipe cut taken: after a sort No. uniq sort output
route
Mount: mount directory Mounting file
-o loop file names .iso / directory to mount the iso file to a specified directory
dmesg: similar functions and tail, the default directory
find: Find files directory
-name find the file name / represents the root directory
-iname find similar file name directory
-ipath p, -path p: p line with the path name of the file, ipath ignores case
-name name, -iname name: file name matches the name of the file. iname ignores case,
-size n: n is the file size units, b represents the block group 512 yuan, c denotes the number of characters, k denotes kilo bytes, w is two bytes.
-type c: c is the file type of file
* wildcard
whereis: to find the same function, the result of small, fast and look for package management area
-b filename: Find a binary file
echo: displays the write command

Released seven original articles · won praise 0 · Views 77

Guess you like

Origin blog.csdn.net/q20010619/article/details/104877571