Linux package compression and search commands

Package compression and search commands

1. tar: used to pack, compress or decompress files
(1) tar -czvf+ content to be packaged (create compressed file)
(2) tar -xzvf+ content to be decompressed (decompressed file)
z——format v——display process f——target file name
2. grep: used to perform keyword search in the text and display the matching results
(1) grep -v: reverse selection
(2) grep -n: display line number
(3) grep- i: Ignore case
3. find: used to find files according to specified conditions
(1) find -name: find directly based on the file name. For example: find / -name a.txt
(2) find -perm: search according to file permissions. For example: find / -perm 777
(3) find -mtine -n ​​(+n): According to the change time of the file, where -n represents the file within n days, +n represents the file n days ago
(4) find- type: find a certain type of file
[1] find -type -d: directory
[2] find -type -p: pipeline file
[3] find -type -f: ordinary file
[4] find -type -i: symbol Link file

Guess you like

Origin blog.csdn.net/A147254/article/details/108706576