linux命令学习随记

tail -n 500 portal.log 查看portal文件最后500行内容,按住Shift+PgUp,Shift+PgDn 上下翻页;

more -s portal.log   Ctrl+F,Ctrl+B上下翻页,more +20 portal.log 从20行开始展示文件内容;

mv /test/portal.log /home/test 将文件移到test目录下面;

mv file1 file2 将 file1更名为file2;

tar zcvf test.tar.gz file1 file2 将文件1文件2压缩到 test.tar.gz包中;

tar zxvf test.tar.gz  先cd  /test/f1 再执行tar zxvf tar包命令, 将包解压到 f1文件夹中;

du -sh /home/test 查看test目录的大小;

scp [email protected]:/home/test.txt /myfile/file/ 将10.80.25.26服务器上的test.txt文件远程复制到file目录下面;

date -s "2007-08-03 14:15:00" 设置系统时间;

./test.sh > test.log 将test.sh执行的结果输出到test.log文件中,

./test.sh >> test.log 将test.sh执行结果追加到test.log文件中;

猜你喜欢

转载自blog.csdn.net/m0_37601917/article/details/85000321
今日推荐