#passwd kk1
New password:....
#su kk1
$logout //登出回到root
+++++++++++++++++++++++++++++++++++++++
#groupadd sales //新增群組sales
#cat /etc/group
#adduser -g sales kk2 //新增帳號kk2且加入sales群組
#passwd kk2
#cat /etc/passwd //查看帳號資料 或 #id kk2
+++++++++++++++++++++++++++++++++++++++
#cp install.log install.log.kk
#ls -l install.log.kk
#chown kk2:sales install.log.kk //變更檔案install.log.kk擁有者及群組
#ls -l install.log.kk
#chmod ugo+x install.log.kk //檔案增加u,g,o 權限r,w,x(4,2,1)
# chmod -R +w /home/kk2 //資料夾變更權限
+++++++++++++++++++++++++++++++++++++++
#gzip install.log.kk //壓縮為install.log.kk.gz
#gunzip install.log.kk.gz
#tar -cvf Myinstall.log.tar install.log.kk install.log.mm
//打包成Myinstall.log.tar
//-c產生新的包裹檔 -v看指令進度
//-f指定包裹檔名稱 -x將包裹檔解開
#tar -xvf Myinstall.log.tar
#tar -czvf Myinstall.log.tar.gz install.log.kk install.log.mm
//先打包再壓縮 *.tar + *.gz =*.tar.gz
#tar -xzvf Myinstall.log.tar.gz //先解壓縮再解開包裹檔
沒有留言:
張貼留言