|||
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 -lWhich 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.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-7-27 06:17
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社