首页 > 服务器 > SSH常用的命令

SSH常用的命令

2009年03月23号
查看评论 发表评论 2,588次浏览

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

页面: 1 2 3 4 5

类别服务器 标签
  1. 高手
    发表于 2009年03月31号 12时29分22秒 | 1楼

    使用SCP文件内部传送:
    scp 文件名 root@IP:路径

  2. paul smith Scarves
    发表于 2010年06月24号 02时04分37秒 | 2楼

    This is a fine example.

  3. nike airforce
    发表于 2010年06月25号 20时53分11秒 | 3楼

    Hi I just came across quest experience I am looking forward to reading it tomorrow

  4. Herve Leger Dresses
    发表于 2010年06月26号 21时52分29秒 | 4楼

    Thanks online editor. We love it.

  5. timberland 6 inch boots
    发表于 2010年07月01号 11时27分54秒 | 5楼

    How comforting for you

  6. Mens Lacoste Shoes
    发表于 2010年07月10号 13时28分45秒 | 6楼

    Even though it will not be here tomorrow, the effect of it will.

  7. timberland boot
    发表于 2010年07月19号 20时52分22秒 | 7楼

    A nice life you have described

  8. lebron 6
    发表于 2010年07月20号 09时32分19秒 | 8楼

    I think you are right.

  9. MBT Walking Shoes
    发表于 2010年07月25号 14时35分43秒 | 9楼

    I was just scanning this posting and was reminded of what I once read.

  1. 目前没有通告
你必需 登陆 才能发表评论.