wdaaw
1.mkdir ~/test_dir
touch ~/test_dir/test_file.txt
2.cp ~/test_dir/test_file.txt /tmp/copy_of_test.txt
3.rm -r ~/test_dir
4.mkdir -p ~/test_dir
cd ~/test_dir
touch test_file.txt
ln -s test_file.txt soft_link.txt
ln test_file.txt hard_link.txt
软链接是内容存储的是路径不能,硬链接可以它与源文件共享同一份数据
二.1. mkdir -p /home/backup
cp /etc/*.conf /home/backup/
2.ls -l /home/backup | grep -v ^d | wc -l
3.tar -czf etc_backup.tar.gz /home/backup
四。 1.mkdir ~/test_dir
touch ~/test_dir/test_file.txt
2.cp ~/test_dir/test_file.txt /tmp/copy_of_test.txt
3.rm -r ~/test_dir
4.mkdir -p ~/test_dir
cd ~/test_dir
touch test_file.txt
ln -s test_file.txt soft_link.txt
ln test_file.txt hard_link.txt
软链接是内容存储的是路径不能,硬链接可以它与源文件共享同一份数据
二.1. mkdir -p /home/backup
cp /etc/*.conf /home/backup/
2.ls -l /home/backup | grep -v ^d | wc -l
3.tar -czf etc_backup.tar.gz /home/backup
四。1.mkdir ~/test_dir
touch ~/test_dir/test_file.txt
2.cp ~/test_dir/test_file.txt /tmp/copy_of_test.txt
3.rm -r ~/test_dir
4.mkdir -p ~/test_dir
cd ~/test_dir
touch test_file.txt
ln -s test_file.txt soft_link.txt
ln test_file.txt hard_link.txt
软链接是内容存储的是路径不能,硬链接可以它与源文件共享同一份数据
二.1. mkdir -p /home/backup
cp /etc/*.conf /home/backup/
2.ls -l /home/backup | grep -v ^d | wc -l
3.tar -czf etc_backup.tar.gz /home/backup
四。 chown user1:group1 /tmp/copy_of_test.txt
chmod 754 /tmp/copy_of_test.txt
ls -l /tmp/copy_of_test.txt
-rwxr-xr--. 1 user1 group1 28 10月 16 20:46 /tmp/copy_of_test.txt
5 useradd newuser1 -s /bin/bash
groupadd newgroup1
usermod -aG newgroup1 newuser1
userdel newuser1
6.
# mkdir perm_test_dir
# touch perm_test_file.txt
# chmod 750 perm_test_dir/
chmod 644 perm_test_file.txt
chgrp -R newgroup1 perm_test_dir/
chmod -R 774 perm_test_dir/