Linux命令记录

1. 挂载windows远程目录

sudo mount -t cifs -o username=username,password="password",rw,file_mode=0777,dir_mode=0777 //ip/i_path/ /mnt/o_path/
umount /mnt/o_path

2. 文本按行乱序排列 shuffle

cat in.txt | awk 'BEGIN{srand()}{print rand()"\t"$0}' | sort -k1,1 -n | cut -f2- > out.txt 

3. vim删除偶数行命令

:g/^/+1 d

 4. 获取文件列表并输出到文件中

find $path -name *.jpg > $file

 5. 文件按行拆分

split -l 1000 list -d -a 1 list_

 

posted @ 2017-04-19 20:33  赵俊杰  阅读(405)  评论(0编辑  收藏  举报