1. Create a directory ceshi under the root, create a user directory under the test directory, copy the /etc/passwd and /etc/shadow files to the /ceshi/user directory, and create a hard link file for the /ceshi/user file For passwd.bak, create a soft link sh.link to the /ceshi/user/shadow file
Create the ceshi directory file in the root directory and the user directory file in the ceshi directory
Copy the /etc/passwd file and the /etc/shadow file to the /ceshi/user directory
CP——copy
cp file name 1 (space) file name 2 ( Larger space) file name 3, copy the contents of file name 1 and file name 2 to file name 3,
create hard link file passwd.bak and soft link file sh.link
check, the creation is successful
2. Copy the /etc/ssh/sshd_config file to the /ceshi directory and rename it to sshd
3. Find the files with the file name passwd in the root directory and write the file names of these files into the passwd.txt file
find (search) / (under the root directory) -name (named) passwd (file) | tee (write)/passwd.txt
Check, write successfully
4. Create a test directory in the root user's home directory, and move /ceshi/sshd and /ceshi/user/passwd.bak to the test directory
Create test under root and
move /ceshi/sshd and /ceshi/user/passwd.bak to the test directory
5. Pack the user directory and /root/test/sshd file in the ceshi directory and compress it into the test directory with the gzip program, and download the compressed file to the Windows client
Make a compressed package (named yasuobao), sz /root/test/ compressed package -> download to the Windows client
download successful
6. Decompress the compressed file in 5 to the ordinary user's home directory, find the content of the line starting with b or c from the decompressed file and write its content into the file file under the ordinary user's home directory
Unzip the compressed file to the home directory of the common user.
Find the content of the line starting with b or c and
write it into the file file in the home directory of the common user. Check and write successfully