Linux File Manager
to create touch vim / vi echo redirect
touch management: atime ctime mtime
touch the file name to create the file // If the file does not exist
touch -a -t [CC] YY] MMDDhhmm [.SS]
20,190,827,100,322
-C
Delete 1, mv / tmp
2, the Find | xargs RM
3, RM
RM delete files
Alias RM -i
-i prompt
-f
-r
default case rm-f / is to keep deleted (in centos 5 and following versions)
centos7 and 6 to delete is need to add a parameter; --preserve-root can delete the root
rmdir remove directory
Moving
file transfer has two actions: one is the "push" is the "pull" mode;,
mv move files, rename
-t
mv ABCD / E // move simultaneously into a plurality of files in a directory
mv ab // modify the name of a file name to b
covered issues -i
cp
cp ab
-t
-a can copy the properties directory and directory files!!
install delete and copy files
-d delete files
-t
-g group specified belongs
to specify your main -o
-m assign permissions to copy files
scp - command file transfer between Linux machines;
linux1 - linux2
linux1: scp file root @ ip (linux2): / directory
linux2: scp root @ ip (linux1 : / file in the local directory that
4. Find
locate
need to generate a lookup library - not commonly used
updatedb I look at this library to find the corresponding file
find
according to any one of the attributes of the file, to locate the file
1, inode2, 3 file type, file permissions 4, hardwired having 5, 6 belongs to the main group 7 belongs, file size 8, 9. The modified file name (the globbing) -regex
The -type fdspcbl
-perm 007
-maxdepth look up to some level directory
-mindepth directory to find at least a few levels
the Find ./ -maxdepth 1 + 1 -perm
the Find ./ -maxdepth 2 -perm 755
-links
the Find ./ -maxdepth 1 - 2 links
-user -nouser
-group -nogroup
-size [default unit is how much?]
-mtime -ctime -atime + - digital
-name wildcard
-regex specified using regular expressions
-ok
-exec
|xargs
5, the recursive compression and
compression - 1. Only the file compression; 2, let the source file smaller
the gzip the -Z ---------
bzip2 ----------- -j
xz ------------- J
archive - 1 archive 2 can operate on the directory, the directory will not allow smaller
tar
-c -x
-v
-f filename Specifies the name of the compressed file is created
[decompression, it is best not to compress the file specified]
6, editor
full-screen editor:
Nano
VI Vim
[distinguish sed stream editor line editor]
Vim
. 1, the default command mode -------- | il a A o O enter the edit mode
| line mode to enter the ESC
2, command mode in common technique
2.1. up and down hjkI
2.2 NDD dd remove
p np replication
u (operations on a) the U-(return to the initial state into the file)
YY NYY
GG cursor jumps to the beginning of the line the contents of the file
G cursor jumps document end of the line
C + I dd =
R & lt replacement character cursor to the specified character
enters selectable modes v, to select the specific content, then a corresponding operation
3, line mode
[many of the same line mode operation and sed]
, $ S / ^ # / / G
: $ move the cursor to the end of the file:. 1.
: W is
: W is the filename to save the current file to the new file
: q
:!! WQ // representatives forced
[ZZ can also be saved in the file and exit the command mode]
Find
/ down operation on a next n a N
? n look up above a N following a
multiple files simultaneously edit case
: the Next
vim ab
5DD
: the Next!
the p-
: PERV
: First
: Last
: // exit the current file q
: q:! qa // Quit all files
Comparative view the file
1, the vertical split screen
vim -O ab
move the cursor ctrl + w w releasably
then release the cut panel ctrl + w V
2, the horizontal split screen
vim -oab..
To switch the cursor: ctrl + w w release.
then cut screen: ctrl + w release S
:! qa all out
:! wq to save and exit all