Linux Learning Summary (1)

Source: Internet
Author: User
Tags parent directory
The file wildcard * In a Linux system does not match the hidden files in the directory, and if you restore a home directory that is deleted by mistake, use full directory recovery, such as:
# cp-a/etc/skel/home/git????? #全目录拷贝

# Mkdir-pv/home/git

Error wording:
# cp-a/etc/skel/*/home/git??? Copy #该命令并不会将模板中的文件 (hidden file) to the/home/git directory

Correct wording:

# cp–a/etc/skel/. [^.] */home/git # Note [^.] is excluded. * Matching to the parent directory (..)

?

Ls-d options:
??? To view long list information for a directory, use the-D option: # LS-DL Dir1? , if you do not add the-D option, the file list information in the directory is displayed
??? Ls-dl/dir/*? Displays files or directories in the current directory using the-D option, but does not recursively display alphabetical directories
??? ls-dl/dir/*/Show non-hidden folders in dir directory to use */

?

The difference between a standard regular expression and an extended regular expression:

??? The extended regular expression omits the escape character in the standard regular expression \, as follows:
??? ?: 0 or 1 times (standard regular: \?)
??? +:1 times or more (Standard Regular: \+)
??? {m}: matches m times (Standard Regular: \{m\})
??? {M,n}: At least m, up to N times (Standard Regular: \{m,n\})
??? Group: () (Standard Regular: \ (\))

The VIM command uses G as the full-text selection when deleting and cannot use% as the full-text selection

Such as:? : g/^$/d? Delete blank lines in the document, if there is a tab or space, you need to use: g/^[[space:]]*$/g to delete

Linux Learning Summary (1)

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.