gll89的个人博客分享 http://blog.sciencenet.cn/u/gll89

博文

SSH Commands

已有 1662 次阅读 2017-5-19 23:12 |个人分类:Linux|系统分类:科研笔记| SSH, commands

1. copy/remove folders on a remote machine using SSH

   cp (-r) file1(folder1) file2(folder2)

   rm (-r) file(folder)


2.count the number of files in the current directory    

       this is one:  

       ls -l . | egrep -c '^-'

       Note:

       ls -1 | wc -l

       Which means:ls: list files in dir

       -1: (that's a ONE) only one entry per line. Change it to -1a if you want hidden files too

       | : pipe output onto...

       wc: "wordcount"

       -l: count lines.


   



https://blog.sciencenet.cn/blog-1969089-1055967.html

上一篇:python operations about list
下一篇:BMC
收藏 IP: 128.227.57.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-7-27 06:17

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部