Finding the Top Ten Files in a File System
find /somefilesys -follow -mount -type f -print | xargs ls -hlS | head -10Find file names that contain spaces:
find . -type f -print | while read TheFileName; do echo "${TheFileName}"
| awk '$NF >= 2' ; done
Generate script to rename all sa?? to timestamp they created
ls -l sa?? | awk '{printf "rm %s %s%s%s%s\n",$9,$9,$6,$7,$8}'
This will only print the script to execute by conventional method
ls -l sa?? | awk '{printf "rm %s %s%s%s%s\n",$9,$9,$6,$7,$8}' | sh -x
Comments