2013年6月21日

umount

摘要: umount /mnt/cdromfuser -m /mnt/cdromkill -9 user 阅读全文

posted @ 2013-06-21 20:40 awk 阅读(119) 评论(0) 推荐(0)

2013年6月20日

xargs

摘要: find . -type f -name "*.txt" -print0 | xargs -0 rm -f 找出所有TXT文件并以空格列出,然后按空格为定界符进行删除操作。find sourc_code_dir_path -type f -name "*.c" -print0 | xargs -0 wc -l 统计C程序文件的总行数。 阅读全文

posted @ 2013-06-20 17:21 awk 阅读(157) 评论(0) 推荐(0)

find高级应用

摘要: find . -type d -print 目录find . -type f -print 普通文件find . -type -print 符号链接find . -type f -atime -7 -print 七天内被访问过的所有文件find . -type f -atime 7 -print 恰好七天前被访问过的所有文件-amin,-mmin,-cmin参数对应分钟。另外,find . -type f -size +2k 大于2k的文件。find . -type f -perm 644 -print 打印权限为644的文件。find . -type f -name "*.swp& 阅读全文

posted @ 2013-06-20 16:54 awk 阅读(176) 评论(0) 推荐(0)

find -name

摘要: find /home/slynux -name "*.txt" -printfind . -iname "example*" -print 忽略大小写find . \(-name "*.txt" -o -name "*.pdf" \) -print\...\把中间的部分视为一个整体。-path 允许使用通配符类匹配文件路径或文本。find /home/users -path "*slynux*" -printfind . -iregex ".*\(\.py\ | \.sh\)$&quo 阅读全文

posted @ 2013-06-20 15:16 awk 阅读(625) 评论(0) 推荐(0)

打印文件和目录的列表

摘要: find . -printfind . -print0 阅读全文

posted @ 2013-06-20 15:00 awk 阅读(156) 评论(0) 推荐(0)

2013年6月17日

倒计时

摘要: echo -n Count;tput sccount=0;while true;doif [ $count -lt 40 ];then let count++;sleep 1;tput rctput edecho -n $count;else exit 0;fidone 阅读全文

posted @ 2013-06-17 14:05 awk 阅读(117) 评论(0) 推荐(0)

检查一组命令所花的时间

摘要: start=$(date +%s)commands;statements;end=$(date +%s)difference=$(( end - start ))echo Time taken to execute commands is $difference seconds. 阅读全文

posted @ 2013-06-17 13:46 awk 阅读(142) 评论(0) 推荐(0)

2013年6月16日

彩色屏显

摘要: echo -e "\e[1;31m This is red text \e[0m" 阅读全文

posted @ 2013-06-16 23:57 awk 阅读(111) 评论(0) 推荐(0)

2013年6月15日

Oracle解锁用户

摘要: sqlplus / as sysdba;alter user test account lock;alter user test account unlock; 阅读全文

posted @ 2013-06-15 23:54 awk 阅读(100) 评论(0) 推荐(0)

linux常用命令

摘要: 1./etc/passwd,/etc/shadow,/etc/group/etc/passwd username:passwd:uid:gid:describe:directory:shell/etc/group groupname:passwd:groupid:groupuser /etc/shadow login:passwd:last:min:max:warn:inactive:lost 2. userdel: user newnameis currently logged in wpkill -kill -t pts/1userdel -f 3.file exist,but user 阅读全文

posted @ 2013-06-15 17:53 awk 阅读(195) 评论(0) 推荐(0)

导航