-h command mankind: the store is represented as K, M
cd Open Directory
Create a directory mkdir
pwd displays the current path
cp copy a file or directory
-f Force
-r recursive continuous replication
-a copy all
dd copy special file or partition
dd if = input file output file of = bs = count = number of bytes
Shear movement mv
grep [options] "Search Content" filename
-i ignore case
-n output line number
-v reverse lookup
-color = auto keyword to search out color display
rm delete
-r remove inquiry instruction
-f Forces deletion
Create a file touch
du -sh view the file size
head displays the first few lines from scratch
-n Specifies the number of lines
tail the tail began to show
cat view the file contents
-n Display line numbers
tac reverse display file contents
more dynamic display file contents
less dynamic display from the tail to the head
ln link file is generated
-s source file destination
-s create soft links (shortcuts similar to Windows, permissions are determined by the corresponding source file permissions)
Hard links, with attributes similar to the copy (copy cp -p + synchronous update), and can be updated at the same time and source files, even if the source file is missing can also be accessed via a hard link, real-time backup. But the hard links can not span partitions, hard links can not be used for directory
chmod change file or directory permissions
chmod [{ugoa} {± =} {rwx}] [file or directory], separated by commas
You can view file contents can list the contents of a directory
File: Can cat / more / head / tail / less
Directory: ls can
w write permission
You can modify the contents of the documents can be created in the directory, delete files
File: vim can
Directory: You can touch / mkdir / rmdir / rm (you can delete the files in that directory, even if the file does not have write permission, write permission only can modify the contents of the file, whether the file exists nothing to do, as long as the permissions of the directory on the directory can delete files under)
x execute permission
You can execute the file into the directory can
Files: You can script / command
Directory: cd
There are certain there will be x r permission rights
Prerequisites delete the file is not whether you have write access to the file but whether the directory where you have write access
Chown to change the owner of a file or directory
chown [user] [file or directory]
Chgrp change group belongs to a file or directory
chgrp [User Group] [file or directory]
umask show the default permission settings file
原意:the user file-creation mask
umask [-S]
-S show the new default file permissions to rwx form
The default file is not created enforceability (x)
umask -> 0022
0- special permissions 022 - -w- -w-
Actually 777--022
find file search
find [Search] [matching conditions]
-name Search by name (rather than a precise search fuzzy search)
** Fuzzy search
The asterisk matches any character
? Question mark matches a single character (for example init ???)
-iname not case sensitive
-size + n is greater than XX lookup file data blocks, one block = 512 bytes = 0.5K
-user Find Owner
Find -group according to your group
-amin -5
-cmin -5 file attributes change, look for the property to be modified within 5 minutes file
-mmin modify the file contents
-a (and) two conditions are met
-o (or) can be any one of two conditions are satisfied