Linux-Practice-4-2 将 student用户的家目录复制到/tmp目录中,并保持源文件的属性不变。 cp -a = -dR --preserve=all,可以保持属性 ✅ 但路径有问题:student 用户的家目录通常是 /home/student,不是 /opt/student 12345678[root@localhost ~]# grep student /etc/passwdstud 2026-05-23
Linux-Practice-4-1 新建一个user1用户,UID、GID、主目录均按默认; 12345[root@localhost ~]# useradd user1[root@localhost ~]# [root@localhost ~]# id user1uid=1002(user1) gid=1002(user1) 组=1002(user1)[root@localhost ~]# 新建一个user2用户,UID 2026-05-23
Linux-Practice-8 1.用gzip 方式将/var 目录打包并压缩成文件 var.tar.gz,保存在/root/test 目录下。zcvf命令太长,所以去掉了v 2.用bzip2 方式将/var 目录打包并压缩成文件 var.tar.bz2,存在/root/test 目录下。 3.查看var 目录所占用的磁空间大小。 快速记忆 du 的方法: 2026-05-21
Linux-Practice-3 [root@localhost ~]# history 31 alias 32 wcl 33 alias 34 grep -v ‘^#’ /etc/profile | grep -v ‘^$’ | wc-l 35 grep -v ‘^#’ /etc/profile | grep -v ‘^$’ | wc -l 36 cat 2026-05-21
Hello World Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick 2025-05-21