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)