7.27 class notes for the Marco Education 20-2, number 27th trainees

Source: Internet
Author: User
Tags character classes touch command uppercase letter

Linux specifically distinguishes between the case of letters and the different symbols in English and Chinese.
such as Linux, Linux, Linux, Linux ... For Linux, they are different.
I think this is a painful setting for a new starter, and maybe the old hands are already enjoying it, but they often happen to forget the file name, and then they have to find it themselves.

After the LS command, Linux has a setting is also very convenient, that is to use different colors to distinguish between different file types
Like what:
Green ———— generally available files
Blue ———— Folder
Red ———— Compressed Files
Azure ———— Link file, should be a shortcut to a file
Gray ———— Unrecognized file types

PWD = Printing working directory
Shows which directory the current user is operating under

Relative path and absolute path
Relative path: Relative road strength refers to the relationship of another target point to the path of the current user, is she a sibling, or is he in the second layer subfolder of the previous folder?
How to Operate: CD. /xxx/xxx/x.xx
Absolute path: Absolute path refers to the operation of the time is not dominated by the current directory operation, but from the root of the first level of writing down, this method can directly specify a file or folder
Operating mode: cd/sys/bus/ac97/devices/

Various uses of CDs
Cd..
Back to the top level directory
Cd
Return to your home directory, the normal user will go back to//under the user name of the folder, and the administrator will go directly to the/ROOT Administrator directory
CD-
Go back to the last directory of your own, this directory is the most recent one recorded by the system, that is, if the user knocks two times Cd/bin, then he relies on the CD-can only play in the/bin Infinite circle

Lists the contents of the current directory or the specified directory
Like what:
Ls-a
Show all files in current directory including hidden files
Ls-l
Display files and their modified time, permissions, file size, and other properties
Ls-r
Directory recursion through
Ls-ld
displaying directory and Symbolic link information
Ls-1
File by branch Display
Ls-s
Sort files by small to large
Ls-u
With-T, and press the file's modified time to new to the old display
Ls-u
Display in folders in order of storage

Search by criteria
Like what:
*
Instead of one or more characters
Operating mode: Cat/textdir/*.txt

?
can only replace one character
Operation mode: cat/textdir/*.? Xt

~
Home directory of the current user
Operation mode: LS ~

~username
Specify a user's home directory
Operation mode: LS ~admin

~+
Current working directory
Operation mode: LS ~+

~-
Previous working directory
Operation mode: LS ~-

[0-9]
Search for a single digit
Operating mode: ls/textdir/854297[0-9]

[A-z]
Search for a character from A, A, B, B, C, c to x, X, Z, z letters
Operating mode: ls/textd[a-z]r/

File wildcard characters
[WXC]
Match any one of the characters in the list
[^WXC]
Matches a character other than all characters in the list
Pre-defined character classes: #man 7 glob
[:d Igit:]
Any number, equivalent to 0-9
[: Lower:]
Any lowercase letter
[: Upper:]
Any uppercase letter
[: Alpha:]
Any uppercase and lowercase letters
[: Alnum:]
Any number or letter
[: Space:]
Space
[:p UNCT:]
Punctuation

View file status
Atime
Access time
Mtinme
Modification time
CTime
Change the time. It changed.

Touch command:
-A
Change Atime time
-M
Change Mtime time
-C
If the file does not exist, it is not created

7.27 class notes for the Marco Education 20-2, number 27th trainees

Related Article

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.