Linux command notes

Source: Internet
Author: User


Command
Change group chgrp CHGRP group name file or directory
Change owner Chown Chown [-r] Account name file or directory
Chown [-r] Account name: Group name file or directory
Copy the file to someone else CP source file destination file

The number type changes the permissions of the file CHOMD [-r] XYZ file or directory

Show current directory pwd
Create directory MkDir
Delete Empty directory RmDir
Switch Directory CD
Create an empty directory touch
deleting files Rm-rf
Searching for a file in the file system find
Number of rows in the statistic text, Word WC
Create a linked file ln
Pagination displays text file content more than less
Read the contents of the text from the first line cat
See text content from the last line TAC

Type of File
Regular files regular file, including plain text files and binary files
Catalog Directory
Linked Files Link
Device file devices include block blocks device files and character character device files

The suffix name of the Linux file
Batch document (script) *.sh
Package or compress documents *. Z,*.tar,*.tar.gz,*.zip,*.tgz
Web page File *.html,*.php,*.pl

Under Linux, the filename of each file or directory can be up to 256 characters long

/bin ls,mv,mkdir,gzip,tar,telnet
/boot Linux core and boot-related files
/dev Store device-related files
/etc files that need to be read during startup
/ETC/RC.D the script file used in the process of storing the switch machine
/ETC/RC.D/INIT.D default startup script files for all services
/etc/x11 the directory where the configuration files related to Xwindows are located
Home/Home system default User root directory
/lib function libraries to use when compiling certain programs
/lost+found system produces abnormal errors missing fragments
/MNT Floppy and CD drive to the default mount point place
/root system administrator's root directory
/sbin Placement System Management Common programs
/TMP General user holds temporary files
/usr System Information
/usr/include header files for some kits
Library of functions required for/usr/lib programs and subroutines
/usr/local Software Default installation directory
/usr/share/doc Place some system documentation
/usr/share/man Place Some program description files
/USR/SRC default directory where core source code is placed
/USR/X11R6 x Window system to store related files directory
/var login files or error messages for all services

Directories to note (103)

/etc Startup and system data files
/bin,/sbin,/usr/bin,/usr/sbin the default execution file placement directory for the system
/usr/local system reserved directory for you to install later upgraded packages
Home/Home system default for the user's root directory
/var login, all types of services have a problem when the record
/usr/share/man,/usr/local/man placing documentation for all types of kits

(106)
Absolute paths are written from the root directory "/"
The relative path path is not written by "/", such as CD. /man
. Represents the current layer directory
.. Represents the upper level directory
~ represent your own root directory
~user represents to user the root directory of this person

CD Transform Catalog
PWD Displays the current directory
mkdir Create a new directory
RmDir to delete an empty directory with empty content

LS display file name, attributes, etc.
-A: List all files
-I: Print inode values
-L: Detailed list, along with file size, attributes
--color=never: Color not displayed
--color=always: Color is displayed
--color=auto: The system is self-judging

CP Copy files or directories
RM Delete a file or directory
MV Moving files or directories











Linux command notes

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.