手机学习linux命令 手机运行linux命令( 五 )


chmod 777 file , 等同于 chmod a=rwx file
chmod ug=rwx,o=x file,等同于 chmod 771 file
chmod 4755 filename,可使此程序具有root的权限
ls -l 可以查看列出当前用户的文件权限
zip
zip -r filename.zip filesdir
zip -r test.zip ./_把当前所有文件压缩到test.zip
zip -r test.zip test , 把test文件所有文件及目录 , 要是到test.zip
zip -d test.zip test.txt , 删除压缩文件中test.txt文件
zip -m test.zip ./test.txt,向压缩文件中test.zip中添加test.txt文件
zip -r test.zip file1 file2 file3 filesdir , 处理多个文件和目录 , 空格隔开
unzip
unzip zip-file,解压到当前目录
unzip -d dst-dir zip-file,解压到指定的目录,-d后为指定目录
unzip -n zip-file,不覆盖已经存在的文件,-n为不要覆盖原有的文件
unzip -n -d dst-dir zip-file,解压到指定的目录,不覆盖已经原有的文件
unzip -o -d dst-dir zip-file,-o不必先询问用户覆盖原有文件
unzip -l zip-file , 仅查看压缩文件内所包含的文件
tar
tar cvf test.tar test,把test下所有文件和目录做备份tar czvf test.tar.gz test,把test下所有文件和目录做备份并进行压缩tar xzvf test.tar.gz,把这个备份文件还原并解压缩tar tvf test.tar | more,查看备份文件的内容,并以分屏方式显示在显示器上
tar czvf test.tar.gz test --exclude=test/svn,备份压缩并排除目录
touch
Linux实用命令有哪些?1选择
1.1一个文件的名字为rr.Z,可以用来解压缩的命令时()
tar
gzip
compress
uncompress
1.2可以结束进程命令()
kill
ctrl+c
shutdown
halt
1.3 Linux下对文件进行归档的命令为:(多选)
dd
tar
zip
unzip
1.4 Linux查当前目录下30天以前的文件并移动到/dev/null下的命令:(多选)
find.-mtime 30-type f xargs mv{}/dev/null;
find.-mtime+30-type xargs mv{}/dev/null;
find.-mtime+30-type f-exec mv{}/dev/null;
find.-mtime+30-type f-exec rm–rf{};
1.5 dstat与下面哪个命令类似
vmstat
sar
iotop
abc
1.6 rpm安装软件的参数
rpm-ivh
rpm-Ivh
rpm-Uvh
rpm-Iuvh
1.7 yum升级软件包选项
rpm-uvh
rpm-Uvh
1.8查看网络流量命令是?
iftop
nsload
ifstatd
以上命令全可以
1.9停止进程的命令,除了kill还有谁?
pkill
killa
allkill
以上命令都不正确
1.10服务器之间传文件的命令有?
wget
scp
ftp
以上命令都可以
1.11对文件进行归档的命令为
dd
cpio
gzip
tar
1.12在rpm命令中,安装新的rpm包软件使用的参数是()
-i
-v
-h
-e
1.13du命令中,使用友好的方式显示信息的参数是()
-h
-f
-a
-t
1.14将/home/stud1/wang目录做归档压缩 , 压缩后生成wang.tar.gz文件,并将此文件保存到/home目录下,实现如此任务的tar命令格式___
tar zxvf/home/stud1/wang.tar.gz/home/wang
tar xcvf/home/stud1/wang/home/wang
tar zcv/home/stud1/wang/home/wang
tar zcvf/home/stud1/wang/home/wang.tar.gz
1.15终止一个前台进程可能用到的命令和操作()A:kill
B:CTRL+C
C:shutdown
D:halt
1.16关闭Linux系统(不重新启动)可使用命令()
A:Ctrl+Alt+Del
B:halt
C:shutdown-r now
D:reboot
1.17下列提法中,不属于ifconfig命令作用范围的是__
A:配置本地环回地址
B:配置网卡的IP地址
C:激活网络适配器
D:加载网卡到内核中

推荐阅读