Friday, 10 August 2012

Script to fetch files of more than 2GB

Script to fetch files of more than 2GB
===============

1)vi test.sh

2) Put the following script in that file

#!/bin/sh
for i in `find . -size +2000000k -type f`
do
du -sch $i;
done

3) Give executable permission to the script file by

  chmod +x test.sh

4) run the script
 sh test.sh

No comments:

Post a comment

Note: only a member of this blog may post a comment.