Linux Common commands

Source: Internet
Author: User
Tags chmod create directory parent directory

Linuxlinux Operating System Features: There is no drive letter in the system. Only files. directory structure:/etc Storage System configuration file. (Network configuration Firewall ....) Home./zhouyan/yan/root Super Admin home/usr shared file/system root directory Common directory   Disk CommandLS view files or folders under directory-a View all files (containing hidden files)-L displays the details of the file or directory Combination:Ls-al query all file names ll-a query all file names CD switch directory CD/system root/CD space default switch to current user's root (home) ★★/ROOTCD ~ Current user's root (home)/rootcd: Previous Directory ★★CD-returns the last Access directory PWD displays the current working directory mkdir create directory ★mkdir-pv-p in case the parent directory does not exist, first create the parent directory and then create the subdirectory-V displays the details of the execution touch file name creation file----------- ---------- file OperationsCP Copy file or directory-R loop recursion-a file or directory already exists for a directory that is copied to the replicated directory ★-b. First back up the original file or directory, in the copy (understand) development: publish the project or resource, first back up and then overwrite. MV Move or rename-F Force overwrite RM Delete file or directory-F Force Delete-R loop recursion--If the directory has subdirectories or files. Delete a subdirectory or file, and then delete the parent directory combination: RM-RF Strong turn round Delete ★★★find query Query the file or folder under the specified directory-name query the find specified directory based on the file name or directory name-name ' article Name of the item or directory '--------------------- Document Editor ★VI or VIM edit file when vim modifies a file, some keywords are highlighted. Format: Vim file name Basic mode: General mode: Vim file name, default into general mode copy, delete ... Insert mode Press "A/I/O" to enter insert mode to modify file contents A current cursor after inserting i current cursor insert o next line Insert bottom line mode press ESC to return to normal mode. Press ":" to toggle to the bottom line mode ": Wq" Save and Exit ": q!" does not save exit YY copy when line-- General mode P Paste--General mode DD Delete Cursor line--General mode x Delete cursor character--delete only one--General mode grep command: grep-i haha a/1.txt used to filter/query special characters grep-i keyword file path-I ignore case Inquire Pipeline |Format: Command 1| Command 2: Command 1 outputs the contents of the output as a combination of command 2 input: Ps-ef|grep process name--------------------- file Browse ★Cat queries the file for all content. For: Querying profiles more paging query (understanding) Less paged query ★★★-m display percent-n display line number/down search? Search up Q exit tail View the content at the end of the file ★★★-f loop query combination: Tail-f log file path--------------------- system CommandsPS View Process mix: Ps-ef Query the details of all processes Ps-ef | grep process name query specified process kill kill process-9 force kill process combination: kill-9 process number (PID) ifconfig Display Network configuration information Ping tests connectivity to the target host--------------------- compression and decompression tar★★★TAR-C compression-X decompression----Show execution details-Z Whether to use gzip compression-F to specify the name of the compressed file combination: TAR-ZCVF compressed file name needs to be compressed files or directory compression ' TAR-ZXVF need to unzip the filename by default decompression to the current archive directory TAR-ZXV F need to unzip the filename-C directory to extract the specified directory file Permissions chmodCombination: chmod 777 files or directories add read, write, execute permissions to all users ★chmod 775 files or directories current and owning group users add read, write, execute permissions, other groups add read, execute permissions ★chmod 000 files or directories Cancel all permissions on a file or directory (few) network configuration: Mode 1. Modify configuration file Cat/etc/sysconfig/network-scripts/ifcfg-eth0 Restart Network Service: Service network restart

Linux Common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.