SSH常用的命令
1. Basic Instructions /基本指令
2. wget /下载工具
3. Crontab /定时任务
4. tar/tar.gz /压缩文件
5. vi /编辑器1. Basic Instructions基本操作命令
通常来说,使用”$[Instructions] –help”可以获得以下各个命令[instructions]的帮助,包含其参数列表的定义。
-ls 列出当前文件夹下所有内容
$ls -o 列出当前文件夹中所有内容,含详细信息,但不列出group
$ls -l 同上,含group信息
$ls -a 列出当前文件夹中所有内容,包含以”.”开头的文件
$ls -t 按更改时间排序
$ls -v 按版本先后排序
-cd [dir] 进入文件夹
-pwd 显示当前路径
-mkdir [dir] 新建文件夹
-chmod 更改文件/文件夹权限
$chmod [Mode] [dir],其中Mode形如”755″或”777″等。
$chmod [Mode] [file]
$chmod -R [Mode] [dir],递归形式,即将目标文件夹内所有文件均改变权限
Mode还有另一种表达方式,”755″即为”-rwxr-xr-x”,不列举了。
-rm [file] 删除文件/文件夹
$rm -f [file] 强行删除,忽略不存在的文件,无提示
$rm -r [file] 递归删除所有内容
-cp 拷贝
$cp [options] [source] [destination]
其中[options]可以为-f(强行拷贝)或-r(递归拷贝)
-mv 重命名或移动
$mv [options] [source] [destination]
[options]常用:-f(强行移动/重命名), -i(移动/重命名前尝试), -u(更新)
例如
$mv wwwroot/cgi-bin . 将/cgi-bin目录移动到当前目录下
$mv cronfile.txt myfile.txt 将cronfile.txt重命名为myfile.txt
使用SCP文件内部传送:
scp 文件名 root@IP:路径
This is a fine example.
Hi I just came across quest experience I am looking forward to reading it tomorrow
Thanks online editor. We love it.
How comforting for you
Even though it will not be here tomorrow, the effect of it will.
A nice life you have described
I think you are right.
I was just scanning this posting and was reminded of what I once read.