Press the "tab" key on the keyboard to automatically fill the full path
PWD Query path
Cd.. Switch to the previous level of the directory
CP: Copy file (CP path target path)
Linux's SCP commands allow you to copy files and directories between Linux;
==================
SCP command
==================
The SCP can replicate files between 2 Linux hosts;
Command basic format:
SCP [Optional parameters] File_source File_target
======
Replicate from local to remote
======
* Copy files:
* Command format:
SCP Local_file Remote_username@remote_ip:remote_folder
Or
SCP Local_file Remote_username@remote_ip:remote_file
Or
SCP Local_file Remote_ip:remote_folder
Or
SCP Local_file Remote_ip:remote_file
=====
LS: Querying the current directory ll will be displayed in the form of a list
More file: Is the content of the display file information, can not be modified
Cat files: IBID., query Display information
VI File: Display the contents of the file information, you can modify
The result of Echo > Manager.log is to empty the log with an empty output (that is, empty the log; ' > ' is also like a pipe)
grep and ' | ' Use of pipelines: (grep reference: http://linux.chinaunix.net/techdoc/system/2008/01/21/977150.shtml)
Ps-ef | grep memcached | grep 11211 View Process
more/usr/twsm/aischool-install/config/install.cfg | grep ^aischool_dbpasswd | cut-d "="-f2----Get password string
Kill-9 Delete Process
Zip-r Aischool-app-install.zipaischool-app-install Zip Package
Unzip-o Aischool-install.zip Extract Zip Package
VI into the editor
Launch editor: First esc-> ": Q" or ": q!" -> carriage return on the launch of ": Q." "(Do not Save Exit)": Wq (Save exit)
Set file permissions
chmod a+r+x-r/aqjg/tomcat6.0.26
A All Users u attribution User G Group O other users
= have permissions + Add permissions-Remove permissions
R readable permission w writable permission x executable permission
For example:
A+x Add executable permissions to all users
GO-WX the writable, executable permissions of the attribution group and other users
U=RWX attribution user with readable, writable, executable permissions
Su-user name: Toggle User
RM–RF (*.* or *) Clearance directory or delete file
SH Perform installation
1, extract the zip to the specified file below:
Unzip-o test.epub-d tmp/
2, recursive compression (epub file) files under the current directory:
Zip-r test.epub./*
3. Move epub file to specified directory (delete original compressed file)
mv/data/contentftp/cnbjtw0/content/2012/12/7/epub/88/88.epub/data/contentftp/cnbjtw0/content/2012/12/7/epub/
Move epub file, overwrite does not prompt.
\mv/data/contentftp/cnbjtw0/content/2012/12/7/epub/88/88.epub
/data/contentftp/cnbjtw0/content/2012/12/7/epub/88.epub
4, copy epub file to the specified directory (will not delete the original compressed file)
Cp-r/data/contentftp/cnbjtw0/content/2012/12/7/epub/88/88.epub
/data/contentftp/cnbjtw0/content/2012/12/7/epub/
5, need "\cp-f" only can copy the file does not prompt.
\cp-f/data/twcontentftp/picture/default/default.jpg/data/twcontentftp/picture/drm/default_88.jpg
Jstack PID View stack information for Java processes
###########################
Tail is the number of lines that display the contents of a file;
Tail-n row numeric file name;
For example, we show the last 5 lines of/etc/profile, which should be:
# tail-n 5/etc/profile
Tail-f/usr/tmp/logs/daemon_log.txt The above example can dynamically display the dynamic update of the log file.
###########################
more parameter application examples;
# more-dc/etc/profile Note: Displays prompts and displays from the terminal or top of the console;
# more +4/etc/profile Note: From the profile of the 4th line began to show;
# more-4/etc/profile Note: Display 4 lines per screen;
# more +/mail/etc/profile Note: Starting from the first two lines of a MAIL word in profile;
More action instructions;
We look at a larger file, to use more action instructions, such as ctrl+f (or space bar) is to display a screen, ctrl+b is to return to the previous screen;
The ENTER key can scroll down to show N row, to pass a set, default is 1 lines;
We only say a few commonly used;
Enter down n line, you need to define, the default is 1 lines;
CTRL+F scroll down one screen;
The null key scrolls down one screen;
Ctrl+b return to the previous screen;
= Output the line number of the current line;
: F output File name and line number of the current line;
V Call VI Editor;
! Command calls the shell and executes the command;
Q Quit more
###########################
Less is similar to more, but better still, he can [pgdn][pg up] the page.
More, less
In fact, the two commands have a great similarity between the paging display of the contents of the file, but the difference is also the following:
1 more: In the form of a percentage of pagination display, prompted to the user has shown how much content
Less: no hint of percentage
2 less more flexible, you can use the "PageDown" "Page Up" on the flip page to see what has been shown, and more does not have
SHIFT + G shortcut keys to quickly load all content.
3 to less display of content can use/' character ' input needs to look for characters or strings and highlighted, and more does not have
3. nl
Display the contents of the file output line number, similar to Cat-n functions, but also the overall output
Important web site :
http://www.cnblogs.com/skey_chen/archive/2011/03/29/1998912.html---Linux common command and application deployment
Http://www.cnblogs.com/laov/p/3541414.html#chmod
http://blog.csdn.net/xiaoguaihai/article/details/8705992
http://blog.chinaunix.net/uid-16728139-id-3154272.html--linux commonly used commands detailed