file 强迫读入另一个文件进入vi,原文件不作存档动作。 存储及退出vi :w filename 存入指定文件,但未退出vi(若未指定文件名则为当前工作的文件名)。 :wq 或者 :x或者zz 存文件,并且退出vi. :q 不作任何修改并退出vi。 :q! 放弃任何修改并退出vi。 :!command 暂时退出vi并执行shell指令,执行完毕后再回到vi。 :
或help [command] 命令帮助 binary 设定以二进制方式传送文件 ascii 设定以ASCII方式传送文件(缺省值) cd [directory] 改变远程目录 pwd 列出当前远端主机目录 dir [r-dir] [l-file] 显示远程目录内容,r-dir表示远程目录,l-file表示本地文件。如果有本地文件,就将结果写至本地文件 ls [r-dir] [l-file] ...
This command will prompt you to confirm if there is already a file with the name newfilename. mv (move files) This command allows you to rename a file as in: mvoldfilenamenewfilename Or to move a file to a new directory: mv filename directoryname/ As with cp, it is a good idea...
To find and operate on file us the -exec option. This allows a command to be executed on files that are found.find ./foo -type f -name bar -exec chmod 777 {} \; How to find and replace in a range of files To find and replace across a range of files the find command may ...
文件oldfile中 1.23 unpack 语法: unpack 文件… 例子: unpack largefile.z 将压缩文件largefile.z解压后转储为largefile 1.24 find 语法: find 路径名… 表达式 说明: find 命令递归地遍历指定路径下的每个文件和子目录,看该文件是否能使表达式值为真,以下 n 代表一个十进制整数,+n 代表打印 n , -n 代表小于...
script from cron your current directory (PWD) is set to your home directory. Unix2dos creates the temporary file used in the conversion in your home directory then can't find it to rename it. Not sure why it can't find it. I added a change directory command (cd) and Unix2dos ...
$ ssh -V OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 More ssh examples: 5 Basic Linux SSH Client Commands 5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix fil...
5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command. $sed 's/.$//' filename Print file content in reverse order $ sed -n '1!G;h;$p' thegee...
cat file1 | command( sed, grep, awk, grep, etc...) >> result.txt 合并一个文件的详细说明文本,并将简介写入一个已有的文件中 grep Aug /var/log/messages 在文件 '/var/log/messages'中查找关键词"Aug" grep ^Aug /var/log/messages 在文件 '/var/log/messages'中查找以"Aug"开始的词汇 ...
find $HOME -type f -ls | less 用一条命令构造目录树你可以用mkdir加上-p选项一次创建一颗目录树: mkdir -p /jail/{dev,bin,sbin,etc,usr,lib,lib64}ls -l /jail/ 将文件复制到多个目录中不必运行: cp /path/to/file /usr/dir1cp /path/to/file /var/dir2cp /path/to/file /nas/dir3...