题目:
编写个shell脚本将当前目录下大于10K的文件转移到/tmp目录下。
答案:
#!/bin/bash for FileName in `ls -l | awk '$5>10240 {print $9}'`; do mv $FileName /tmp done ls -al /tmp
题目:
编写个shell脚本将当前目录下大于10K的文件转移到/tmp目录下。
答案:
#!/bin/bash for FileName in `ls -l | awk '$5>10240 {print $9}'`; do mv $FileName /tmp done ls -al /tmp