日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

man手册、zip备份

發布時間:2023/10/11 综合教程 86 老码农
生活随笔 收集整理的這篇文章主要介紹了 man手册、zip备份 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

                                                                                                            man手冊、zip備份

3.1問題

本例要求掌握man幫助手冊的使用,以及zip壓縮/解壓縮的操作,完成下列任務:

查閱passwd命令、/etc/passwd配置文件的手冊頁

使用zip打包/usr/share/doc/qemu-kvm/目錄

3.2方案

zip/unzip壓縮與解壓縮:

制作zip壓縮包:zip[-r]備份文件.zip被歸檔的文檔...

釋放zip壓縮包:unzip備份文件.zip[-d目標文件夾]

3.3步驟

實現此案例需要按照如下步驟進行。

步驟一:使用man手冊頁獲取幫助

1)查看passwd命令的手冊頁

[root@svr7~]#man passwd

PASSWD(1)User utilities PASSWD(1)

NAME

passwd-update user's authentication tokens

SYNOPSIS

passwd[-k][-l][-u[-f]][-d][-e][-n mindays][-x maxdays][-w

warndays][-i inactivedays][-S][--stdin][username]

DESCRIPTION

The passwd utility is used to update user's authentication token(s).

This task is achieved through calls to the Linux-PAM and Libuser API.

Essentially,it initializes itself as a"passwd"service with Linux-

PAM and utilizes configured password modules to authenticate and then

update a user's password.

....

2)查看/etc/passwd配置文件的手冊頁

[root@svr7~]#man 2 passwd

PASSWD(5)Linux Programmer's Manual PASSWD(5)

NAME

passwd-password file

DESCRIPTION

The/etc/passwd file is a text file that describes user login

accounts for the system.It should have read permission allowed for

all users(many utilities,like ls(1)use it to map user IDs to user‐

names),but write access only for the superuser.

In the good old days there was no great problem with this general

read permission.Everybody could read the encrypted passwords,but

the hardware was too slow to crack a well-chosen password,and more‐

over the basic assumption used to be that of a friendly user-commu‐

nity.These days many people run some version of the shadow password

suite,where/etc/passwd has an'x'character in the password

....

步驟二:使用zip命令制作壓縮包

1)將目錄/usr/share/doc/qemu-kvm/備份為/root/qemu-kvm.zip

[root@svr7~]#zip -r /root/qemu-kvm.zip /usr/share/doc/qemu-kvm/

adding:usr/share/doc/qemu-kvm/(stored 0%)

adding:usr/share/doc/qemu-kvm/COPYING(deflated 62%)

adding:usr/share/doc/qemu-kvm/COPYING.LIB(deflated 65%)

adding:usr/share/doc/qemu-kvm/Changelog(deflated 61%)

adding:usr/share/doc/qemu-kvm/LICENSE(deflated 45%)

adding:usr/share/doc/qemu-kvm/README(deflated 4%)

2)恢復測試

刪除目標文件夾并確認結果:

[root@svr7~]#rm -rf /usr/share/doc/qemu-kvm/

[root@svr7~]#ls /usr/share/doc/qemu-kvm/

ls:cannot access/usr/share/doc/qemu-kvm/:No such file or directory

恢復目標文件夾并確認結果:

[root@svr7~]#unzip /root/qemu-kvm.zip-d/

Archive:/root/qemu-kvm.zip

creating:/usr/share/doc/qemu-kvm/

inflating:/usr/share/doc/qemu-kvm/COPYING

inflating:/usr/share/doc/qemu-kvm/COPYING.LIB

inflating:/usr/share/doc/qemu-kvm/Changelog

....

[root@svr7~]#ls /usr/share/doc/qemu-kvm/

COPYING README qemu-tech.html

COPYING.LIB README.rhel6-gpxe-source qmp-commands.txt

Changelog README.systemtap qmp-events.txt

LICENSE qemu-doc.html qmp-spec.txt

總結

以上是生活随笔為你收集整理的man手册、zip备份的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。