ls command
ls -a show all files including hidden files
ls -A shows all files including hidden files except . and ..
ls -r reverses the list of files
ls -R only displays the first-level subdirectories and files by default, and R stands for recursive loop display of subfile information
ls -l /etc Display detailed attributes of all files in the /etc directory
ls -ld /etc displays detailed properties of the /etc directory itself
ls -1 (number 1) /etc Display one file name per line and display it in alphabetical order
ls -d */ show only subfolders but not subfiles
ls /etc/*.conf
Cancel the way to use the alias command \cp a /root to get 'cp' a /root This means not to use the cp alias command
file link
Hard link
1. The essence of a hard link is that a file has multiple names and each name is independent of each other.
2. Creating a hard link cannot span partitions
3.ln f1 f2 Create a hard link f2 for the f1 file
4. No Support for folder creation
Soft link
1.ln -s f1 f1_link
2. Soft link can be created across partitions
3. The size of the soft link file (the path where the corresponding file is stored) is determined by the length of the original file path string
4. Supports the creation of folders
The role of the link The
version switching of the deployment software generally uses the soft connection ln -s ngix ngix1.0
ln -s /usr/local/python3/bin/python3 /usr/bin/python
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip