练习题一(7.15)

1. 使⽤ls查看/etc/⽬录下所有的⽂件信息

[root@localhost ~]# ls /etc/
adjtime                  hosts                     rc1.d
aliases                  hosts.allow               rc2.d
aliases.db               hosts.deny                rc3.d
alternatives             init.d                    rc4.d
anacrontab               inittab                   rc5.d
asound.conf              inputrc                   rc6.d
audisp                   iproute2                  rc.d
audit                    issue                     rc.local
bash_completion.d        issue.net                 redhat-release
bashrc                   kdump.conf                resolv.conf
binfmt.d                 kernel                    resolv.conf.save
centos-release           krb5.conf                 rpc
centos-release-upstream  krb5.conf.d               rpm
chkconfig.d              ld.so.cache               rsyslog.conf
chrony.conf              ld.so.conf                rsyslog.d
chrony.keys              ld.so.conf.d              rwtab
cron.d                   libaudit.conf             rwtab.d
cron.daily               libnl                     sasl2
cron.deny                libuser.conf              securetty
cron.hourly              locale.conf               security
cron.monthly             localtime                 selinux
crontab                  login.defs                services
cron.weekly              logrotate.conf            sestatus.conf
crypttab                 logrotate.d               shadow
csh.cshrc                lvm                       shadow-
csh.login                machine-id                shells
dbus-1                   magic                     skel
default                  makedumpfile.conf.sample  ssh
depmod.d                 man_db.conf               ssl
dhcp                     mke2fs.conf               statetab
DIR_COLORS               modprobe.d                statetab.d
DIR_COLORS.256color      modules-load.d            subgid
DIR_COLORS.lightbgcolor  motd                      subuid
dracut.conf              mtab                      sudo.conf
dracut.conf.d            my.cnf                    sudoers
e2fsck.conf              my.cnf.d                  sudoers.d
environment              NetworkManager            sudo-ldap.conf
ethertypes               networks                  sysconfig
exports                  nsswitch.conf             sysctl.conf
favicon.png              nsswitch.conf.bak         sysctl.d
filesystems              openldap                  systemd
firewalld                opt                       system-release
fonts                    os-release                system-release-cpe
fstab                    pam.d                     terminfo
fuse.conf                passwd                    tmpfiles.d
gcrypt                   passwd-                   tuned
GeoIP.conf               pkcs11                    udev
GeoIP.conf.default       pki                       vconsole.conf
gnupg                    plymouth                  vimrc
GREP_COLORS              pm                        virc
groff                    polkit-1                  vmware-tools
group                    popt.d                    vsftpd
group-                   ppp                       wgetrc
grub2.cfg                prelink.conf.d            wpa_supplicant
grub.d                   printcap                  X11
gshadow                  profile                   xdg
gshadow-                 profile.d                 xinetd.d
gss                      protocols                 yum
host.conf                python                    yum.conf
hostname                 rc0.d                     yum.repos.d

2. 使⽤ls查看/etc/⽬录下名包含“a”字⺟的⽂件或者⽬录信息

[root@localhost ~]# ls /etc/*a*
/etc/adjtime                  /etc/gshadow-                  /etc/os-release
/etc/aliases                  /etc/hostname                  /etc/passwd
/etc/aliases.db               /etc/hosts.allow               /etc/passwd-
/etc/anacrontab               /etc/inittab                   /etc/printcap
/etc/asound.conf              /etc/ld.so.cache               /etc/rc.local
/etc/bashrc                   /etc/libaudit.conf             /etc/redhat-release
/etc/centos-release           /etc/locale.conf               /etc/resolv.conf.save
/etc/centos-release-upstream  /etc/localtime                 /etc/rwtab
/etc/crontab                  /etc/logrotate.conf            /etc/sestatus.conf
/etc/crypttab                 /etc/machine-id                /etc/shadow
/etc/dracut.conf              /etc/magic                     /etc/shadow-
/etc/favicon.png              /etc/makedumpfile.conf.sample  /etc/statetab
/etc/fstab                    /etc/man_db.conf               /etc/sudo-ldap.conf
/etc/GeoIP.conf.default       /etc/mtab                      /etc/system-release
/etc/gshadow                  /etc/nsswitch.conf.bak         /etc/system-release-cpe
 
/etc/alternatives:
ld  libnssckbi.so.x86_64
 
/etc/audisp:
audispd.conf  plugins.d
 
/etc/audit:
auditd.conf  audit.rules  audit-stop.rules  rules.d
 
/etc/bash_completion.d:
iprutils  redefine_filedir
 
/etc/cron.daily:
logrotate  man-db.cron
 
/etc/default:
grub  nss  useradd
 
/etc/dracut.conf.d:
 
/etc/firewalld:
firewalld.conf  helpers  icmptypes  ipsets  lockdown-whitelist.xml  services  zones
 
/etc/logrotate.d:
bootlog  chrony  mysql  syslog  vsftpd  wpa_supplicant  yum
 
/etc/modules-load.d:
 
/etc/NetworkManager:
conf.d        dnsmasq.d         NetworkManager.conf
dispatcher.d  dnsmasq-shared.d  system-connections
 
/etc/openldap:
certs  ldap.conf
 
/etc/pam.d:
chfn                 passwd            runuser-l          system-auth
chsh                 password-auth     smartcard-auth     system-auth-ac
config-util          password-auth-ac  smartcard-auth-ac  systemd-user
crond                polkit-1          sshd               vlock
fingerprint-auth     postlogin         su                 vmtoolsd
fingerprint-auth-ac  postlogin-ac      sudo               vsftpd
login                remote            sudo-i
other                runuser           su-l
 
/etc/rwtab.d:
logrotate
 
/etc/sasl2:
 
/etc/statetab.d:
 
/etc/vmware-tools:
GuestProxyData       poweron-vm-default  statechange.subr    vgauth.conf
guestproxy-ssl.conf  resume-vm-default   suspend-vm-default
poweroff-vm-default  scripts             vgauth
 
/etc/wpa_supplicant:
wpa_supplicant.conf

3. 使⽤ls查看/etc/⽬录下以".conf"结尾的⽂件信息

[root@localhost ~]# ls /etc/*.conf
/etc/asound.conf  /etc/kdump.conf      /etc/man_db.conf    /etc/sudo-ldap.conf
/etc/chrony.conf  /etc/krb5.conf       /etc/mke2fs.conf    /etc/sysctl.conf
/etc/dracut.conf  /etc/ld.so.conf      /etc/nsswitch.conf  /etc/vconsole.conf
/etc/e2fsck.conf  /etc/libaudit.conf   /etc/resolv.conf    /etc/yum.conf
/etc/fuse.conf    /etc/libuser.conf    /etc/rsyslog.conf
/etc/GeoIP.conf   /etc/locale.conf     /etc/sestatus.conf
/etc/host.conf    /etc/logrotate.conf  /etc/sudo.conf


4. 使⽤ls查看/etc/⽬录中以"y"字⺟开头的⽂件信息

[root@localhost ~]# ls /etc/y*
/etc/yum.conf
 
/etc/yum:
fssnap.d  pluginconf.d  protected.d  vars  version-groups.conf
 
/etc/yum.repos.d:
tgsy.repo


5. find查找/var/⽬录中以“.log”⽂件

[root@localhost ~]# find /var/ -name "*.log" -type f
/var/log/tuned/tuned.log
/var/log/audit/audit.log
/var/log/anaconda/anaconda.log
/var/log/anaconda/X.log
/var/log/anaconda/program.log
/var/log/anaconda/packaging.log
/var/log/anaconda/storage.log
/var/log/anaconda/ifcfg.log
/var/log/anaconda/ks-script-hPtrDE.log
/var/log/anaconda/ks-script-wn28ax.log
/var/log/anaconda/journal.log
/var/log/boot.log
/var/log/vmware-vmsvc.log
/var/log/yum.log
/var/log/mysqld.log


6. 在opt⽬录下创建test⽬录

[root@localhost ~]# mkdir /opt/test

7. 在test⽬录中创建abc.txt,def.txt.ghi.txt,xxx.txt.yyy.txt五个⽂件

[root@localhost ~]# mkdir /opt/test
[root@localhost ~]# cd /opt/test
[root@localhost test]# touch abc.txt def.txt ghi.txt xxx.txt yyy.txt


8. 修改以上5个⽂件的最后修改时间分别为15,14,13,12,11,10⽇

[root@localhost test]# touch abc.txt def.txt ghi.txt xxx.txt yyy.txt
[root@localhost test]# touch abc.txt -m -d "2024-7-15 00:00"
[root@localhost test]# touch def.txt -m -d "2024-7-14 00:00"
[root@localhost test]# touch ghi.txt -m -d "2024-7-13 00:00"
[root@localhost test]# touch xxx.txt -m -d "2024-7-12 00:00"
[root@localhost test]# touch yyy.txt -m -d "2024-7-11 00:00"


9. 在test⽬录下创建a⽬录

[root@localhost test]# mkdir a


10. 将以上5个⽂件复制⼀份到a⽬录中

[root@localhost test]# cp abc.txt a
[root@localhost test]# cp def.txt a
[root@localhost test]# cp ghi.txt a
[root@localhost test]# cp xxx.txt a
[root@localhost test]# cp yyy.txt a


11. 将a⽬录⽂件做成bak.tar.gz⽂件保存到家⽬录中

[root@localhost test]# cd /home/
[root@localhost home]# tar -zcvf bak.tar.gz /opt/test/a
tar: 从成员名中删除开头的“/”
/opt/test/a/
/opt/test/a/abc.txt
/opt/test/a/def.txt
/opt/test/a/ghi.txt
/opt/test/a/xxx.txt
/opt/test/a/yyy.txt


12. 使⽤find删除test⽬录下3天前的⽂件

[root@localhost home]# find /opt/test/ -mtime +3 | xargs rm -rf


13. find删除opt⽬录下3天内的⽂件

[root@localhost home]# find /opt/* -mtime -3 -exec rm -rf {} \;


14. find删除正好第三天的⽂件

[root@localhost home]# find /opt/test -mtime 3 -exec rm -rf {} \;


15. 将/opt/test/a⽬录中的⽂件复⼀份到/opt/test/⽬录下

[root@localhost ~]# cp /opt/test/a/* /opt/test


16. 创建⽬录/opt/test0

[root@localhost ~]# mkdir /opt/test0


17. 在/opt/test0/⽬录中创建三个⽂件 a.mp4(5M),b.mp4(20M),c.mp4(80M)

[root@localhost ~]# dd if=/dev/zero of=a.mp4 bs=5M count=1
记录了1+0 的读入
记录了1+0 的写出
5242880字节(5.2 MB)已复制,0.0195403 秒,268 MB/秒
[root@localhost ~]# dd if=/dev/zero of=b.mp4 bs=20M count=1
记录了1+0 的读入
记录了1+0 的写出
20971520字节(21 MB)已复制,0.092686 秒,226 MB/秒
[root@localhost ~]# dd if=/dev/zero of=c.mp4 bs=80M count=1
记录了1+0 的读入
记录了1+0 的写出
83886080字节(84 MB)已复制,0.280751 秒,299 MB/秒


18. 创建⽬录/opt/test0/b/

[root@localhost ~]# mkdir /opt/test0/b/


19. 将/op t/test0/中的⽂件复制⼀份/opt/test0/b/⽬录中

[root@localhost ~]# cp /opt/test0/* /opt/test0/b


20. find查询/opt/test0/⽬录中⽂件⼤于20M的,并删除

[root@localhost ~]# find /opt/test0/ -size +20M -exec rm -rf {} \;


21. find查询/opt/test0/⽬录中⽂件⼩于20M的⽂件并删除

[root@localhost ~]# find /opt/test0/ -size -20M -exec rm -rf {} \;


22. find查找/opt/test0/⽬录中⽂件size为20M的⽂件并删除

[root@localhost ~]# find /opt/test0/ -size 20M -exec rm -rf {} \;


23. /opt/test0/b中的⽂件复制⼀份到/opt/test0中

[root@localhost ~]# cp /opt/test0/b/* /opt/test0


24. 打开新的虚拟主机

25. 将家⽬录中的bak.tar.gz⽂件上传到新主机的/opt⽬录中

[root@localhost ~]# scp /home/bak.tar.gz root@192.168.1.11:/opt/
root@192.168.1.11's password:


26. 将新主机的/e tc/skel/⽬录下载到 当前主机的/opt⽬录中

[root@localhost ~]# scp -r root@192.168.1.11:/etc/skel/ /opt/
root@192.168.1.11's password: 
.bash_logout                                        100%   18    19.3KB/s   00:00    
.bash_profile                                       100%  193   241.4KB/s   00:00    
.bashrc                                             100%  231   343.7KB/s   00:00    
notice.text                                         100%   56    97.9KB/s   00:00  


27. 设置计划任务,每周3将/e tc/yum.repos.d/⽬录下的.repo⽂件压缩保存到tmp,在⽂件 名中添加时间戳

[root@localhost ~]# crontab -e
 
 
0 0 * * 3 /usr/bin/tar -zcvf /tmp/etc_$(date "+\%Y\%m\%d\%H\%M\%S").tar.gz /etc/yum.re
pos.d/*.repo

  • 5
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Camunda是一个开源的工作流引擎,可以用于管理和执行各种类型的业务流程。作为全球范围内广泛使用的工作流引擎,Camunda非常重视其国际化和本地化的能力。为了满足中国用户的需求,Camunda团队已经开始进行Camunda 7.15的汉化工作。 Camunda 7.15汉化的目标是提供一个完全汉化的用户界面,使中国用户能够更轻松地使用和管理Camunda工作流引擎。这意味着所有的菜单、标签、按钮等用户界面元素都将以中文显示。此外,Camunda还将提供中文的文档、教程和示例,以帮助中国用户更好地理解和使用Camunda。 为了实现这个目标,Camunda团队正在进行大量的翻译工作。他们正在对Camunda的用户界面进行全面的翻译,包括对各个菜单和标签进行翻译,确保所有的界面元素可以用中文正确显示。此外,他们还在翻译文档、教程和示例,以便中国用户能够更好地理解Camunda的功能和用法。 值得一提的是,Camunda 7.15汉化工作并不仅仅是简单的翻译工作。团队还在努力确保汉化后的用户界面和功能都能够符合中国用户的需求和习惯。他们将在翻译过程中参考中国用户的反馈和建议,以确保汉化后的Camunda工作流引擎能够更好地适应中国用户的使用习惯。 总之,Camunda团队正在积极致力于Camunda 7.15的汉化工作,旨在为中国用户提供一个更友好和便捷的工作流引擎。希望通过这一汉化工作,能够促进Camunda在中国的应用和推广,为中国用户提供更好的工作流管理和执行体验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值