Common commands in linux finishing

unzip

After unzip / compressed file path -d / decompression storage path

Seek

find.-name under "File name" # current directory to find

find / -name "filename" # from the root directory to start looking

whereis filename

copy

cp / path1 / path2 # copied to the path1 path2

Heavy naming

mv 123 abc # 123 will rename abc

This command can also be used to move

Switch User

su # root user switching

su - username to switch to a user #

Find and delete certain files

find . -type d -name ".svn"|xargs rm -rf;

Refresh environment variable

source

./ (dot slash) means that the execution of the current one executable file in the directory. .Exe file
. / (Dot space slash) is equivalent to a script. Binary files in the root directory of the source (I do not quite understand, have time to try, come back to writing about)

Empty the entire contents in vim

In command mode dG emptied the Bank and the following

Enter the next line mode:% d #% represents select all rows, d represents the deleted

Clear file contents in the shell

>echo >filename

Find and Replace

% S / content to replace / alternative content / g #% plus represented globally, without showing the Bank's range, g represents the final match to replace all

Guess you like

Origin www.cnblogs.com/thePeaceOftheLord/p/10948039.html