1, file
file attributes:
-: normal file
d: directory file
B: block device
c: character device file
L: a symbolic link file
P: command pipeline
s: socket file
2, ls
displays directory contents
-l: displays the file attribute, LS = LL -l
-H: accordingly display unit conversion
-a: show all files
-A:. .. and displays all of the files that
-d: display list own property
-i: Reference number miniature display file (index Node, the inode)
-R & lt: reverse file list
-R: display files recursively
3, cd
Change directory
cd back to the user's home directory
cd ~ username: access to designated user's home directory
cd -: a directory in the current directory where the front and back and forth switching
cd ..: Switch to the parent directory
cd / home enter ' / home 'directory'
4, pwd
display the current path
5, touch
to create, update, empty file
-c: existing files when not create
-a: just change the access time of the file
-m: just change the file modification time
-t: own time stamp of the configuration file (DATE hours . sec), and a, m with the use of
6, mkdir / rmdir
mkdir: create directory
rmdir: delete the directory
-p: recursively create
-V: display information created
7, rm
delete files
-i: Interactive delete
-f: Delete violence
-r: recursive delete
command can use a combination of
8, cp
copy files
-r: recursive copy directories
-i: an interactive display copy
-f: Force replication, covering
-p: retention properties of the source file, time stamps
-a: preserve all attributes of the source file
-P: Copy Link save the file is a link (the default is to copy the link points to a file)
-d: copy remains linked
-a: archive copy, and backup commonly used
#cp / etc / passwd / tmp / directory to copy and save the original file name
#cp / etc / passwd / tmp / test see test is a file or directory, the directory: copied to a directory,
the file is replaced!
9, mv
move or rename a file
mv the SRC (source) DEST (destination)
in the unified directory may be utilized to rename mv: mv abc bcd source or target mv -t
10, ln
creates a link files
ln SRC DEST: create a hard link
-s: Create a soft link
-i: show inode number of the file
-v: displays the results of
the hardware connection:
1, can only file is created, can not be applied to directories, files the number of hard links for 2
2, the file system can not boast
3, create a hard link will increase the number of files that are linked
soft connection:
1, can be applied to directories
2, across the file system
3, will not increase the number of connections to be connected file
4, the size of the number of characters contained in the specified path
11, du
displays the size of all the files in the directory
-s: display directory size
-sh: After the display unit conversion
12, wc
text statistics
-l: show only the number of lines
-w: display only the number of words
-c: show only the number of bytes
-L: the longest line of the display contains the number of characters
13, sort
the display sort files
-n: according to numerical values in ascending order
-r: Descending
-t: Specifies the field separator
-k: beginning from which the character is arranged keyword
-u: only the same row show a
-f: ignore character case
14, tree
displays the tree structure of files and directories starting from the root directory