linux directory file processing command

Directory processing command
ls: Display directory file
-a: all files
-l: detailed display
-d: View Properties
-rwxr - r--
-: binary file d: directory l: Soft link file
u: user g: group o: OTHER
mkdir: create a new directory
-p: recursively create
cd: Change directory
cd ..: return to previous
pwd: displays the current directory
rmdir: delete empty directory
rm: delete the file
-r: delete the directory
-f: Force delete
cp: copy files or directories
syntax: cp -rp [original file directory] [destination directory] (multiple files can be copied to the target directory at the same time)
-r copy directories
-p preserve file attributes
replication can be renamed
syntax [target] [after changing the directory filename]
mv: cut the file, rename
renamed mv [filename] [filename] changes


File processing command
touch: create an empty file (must specify absolute path)
CAT: displays the file contents
-n: display the line number
tac: reverse displays the contents of the file
more: page display file contents (not page up)
(blank) or f turn page
(the Enter) wrap
q or Q quit
less: the same effect more (available page up)
/ [contents] can search the contents of files
head: a few lines before the file (ten lines before the default display) display
specified number of rows -n
syntax: head -n 20 [filename]
tail: displays the file last line (after Mo significant j) the
same as the head usage

ln: to create a link file
ln [original document] [target] file hard links (hard links to the same file i node can be updated simultaneously, not across partitions use)
ln -s [file] [target original document] soft links (symlinks)

Guess you like

Origin www.cnblogs.com/hanzhiyu/p/11354035.html