或help [command] 命令帮助 binary 设定以二进制方式传送文件 ascii 设定以ASCII方式传送文件(缺省值) cd [directory] 改变远程目录 pwd 列出当前远端主机目录 dir [r-dir] [l-file] 显示远程目录内容,r-dir表示远程目录,l-file表示本地文件。如果有本地文件,就将结果写至本地文件 ls [r
10:恢复目录(tar 格式)tar xvf /dev/rmt/0n -C /path/to/restore tar xvf /dev/st0 -C /tmp 11:列出或检查磁带内容(tar 格式)mt -f /dev/st0 rewind; dd if=/dev/st0 of=- ### tar 格式 ### tar tvf {DEVICE} {Directory-FileName} tar tvf /dev/st0 tar tvf /dev/st0 desk...
cmp -l file1 file2 比较文件file1 和 file2 的每处不同 1.16 diff 语法: diff [-be] 文件1 文件2 -b 将一串空格或TAB转换成一个空格或TAB -e 生成一个编辑角本,作为ex或ed的输入可将文件1转换成文件2 例子: diff file1 file2 diff -b file1 file2 diff -e file1 file2 >edscript 1.17 wc...
其实就相当于执行了ls -l 9.权限的控制(rwx 421) chmod +x hello.sh 赋于可执行权限. 详细介绍一下权限的控制: chmod 命令 权限修改 用法:chmod 一位8进制数 filename (rwx 421) eg: chmod u+xfilenmame 只想给自己运行,别人只能读 chown netseek.netseekmydir 改变用户属组 u:表示文件所有者...
1. tar 命令 创建一个新的 tar 文档 $ tar cvf archive_name.tar dir name/ 从现有 tar 文档提取文件 $ tar xvf archive_name.tar 查看现有 tar 文档 $ tar tvf archive_name.tar 2. grep 命令 从文件中搜索字符串 $ grep -i "the" demo_file ...
More tar examples: The Ultimate Tar Command Tutorial with 10 Practical Examples 2. grep command examples Search for a given string in a file (case in-sensitive search). $ grep -i "the" demo_file Print the matched line, along with the 3 lines after it. ...
$ tar tvfj archivename.tbz less You can pipe the output of a tar file to the less command. You can directly use the less command to open a tar archive. Less will show you the names of the files, the file sizes, the file permissions, the owner, and the group (the equivalent of ...
less file1 类似于 'more' 命令,但是它允许在文件中和正向操作一样的反向操作 head -2 file1 查看一个文件的前两行 tail -2 file1 查看一个文件的最后两行 tail -f /var/log/messages 实时查看被添加到一个文件中的内容 十二、文本处理 cat file1 file2 ... | command <> file1_in.txt_or_file...
-bash: dos2unix: command not found 安装方法: 在http://linux。softpedia.。com/progdownload/dos2unix-download-5519.html下载hd2u-1.0.0.tgz [root@localhost ~]#tar -zxf hd2u-1.0.0.tgz [root@localhost ~]#cd hd2u-1.0.0 [root@localhost ~]#./configure...
Syntax: where command 2.3 locate (LINUX) Syntax: locate filename 相关命令: updatedb更改locate文件名数据库 3. 查看命令的用法 man 相关文件: /etc/man.config 4. 管理员常用命令 4.1 install 用于安装一个新的命令或daemon等. 一般情况下可以不用,但很多软件在其安装 shell script中使用install将目标文件...