as soon as possible to complete the company's
Linux
Server deployment, installation, operation, need to further learn the basic Linux System file and directory management commands, but also familiar with getting command help common methods to understand the server management, maintenance related to the use of other commands, here is a brief list.
Basic commands for directory and file management.
(1) View and switch directories:pwd,cd,ls,du .
(2) Create directories and files:mkdir,touch,ln.
(3) Copy, delete, move directories and files : CP,rm,mv.
(4) Find directories and files:which,find.
Second, the command to help obtain information.
(1) use the man,--help option to view Help for the Find command and compare their similarities and differences.
use man to view Help for the Find command
use --help to view Help for the Find command
(2) use the man tool to view The man's own manual album information and save it as Man.txt text file.
"|" pipe character ; ">"REDIRECT output ; Col–b Filters Special symbols, such as carriage returns (black borders) to produce plain text.
(3) usingMansTools ViewwgetDownload Tool,DateDate Display Tool's hand-album information and useDatecommand Output "YYYY-MM-DD HH:MM"Format time information (Execute command:date+"%F%R"ordate+"%Y-%m-%d%H:%M").
modification date can be used when:d ate-s: minutes: Seconds
(4) View system directory /sbin,/bin,/usr/bin, What commands or programs are in the /usr/sbin
View/bin,/usr/bin,/usr/sbin in the same way .
View and retrieve operations.
(1) Review the /etc/filesystems file to confirm the file system type supported by the current system.
View /etc/filesystems files: cat/etc/filesystems
2) Paging through the /etc/services file to see the protocols, port numbers used by the various services by default.
page views:less/etc/services
3) filter out the physical memory size, free memory size from the/proc/meminfo file.
filtering, retrieving:grep "Mem" /proc/meminfo
Backup and restore operations
(1) Back up the whole / etc directory tree, make archive compressed package file etc.tar.gz.
make archive backup zip file:tar zcf etc.tar.gz/etc
2) View the list of directories and files contained in the etc.tar.gz file.
Tar ZTVF etc.tar.gz
(3) Restore the etc.tar.gz file to the/ tmp directory, confirm and then delete the /tmp/etc folder.
recovering data from an archive:tar zxf etc.tar.gz-c/tmp
View:ls-dl/tmp/etc/
Delete:rm-rf/tmp/etc/
the basic use of the VI editor.
(1) through "Man man| Col-b > Man.txt"action to create The man command's Text man page, open with VI Editor Man.txt file, use this file as a practice material.
Create The man command's text book page, save as Man.txt:man man | Col –B > Man.txt
Open man.txt file: VI man.txt
(2) switch to the last line mode and enter the ":set nu" command to display the travel number.
Enter the colon ":" To switch to the last line mode, directly enter ": Set Nu" To display the line number.
(3) Copy the contents of line 6 to Line 2 and delete a few blank lines after line 2.
copy : Move the cursor to line 6th, press YY to complete the copy.
move the cursor to the end of Line 1, press P (lowercase) to finish pasting.
OR: Move the cursor to the beginning of Line 2, press P (uppercase), finish pasting
~~~~~~~~end~~~~~~~~~~~~
Use of basic Linux operations commands