Loop files under a set weight to move it to a directory.
bash |copy code |?
1 for f in `find . -iname "*.JPG" -size -500k`; do mv ${f} small; done
Loop files under a set weight to move it to a directory.
bash |copy code |?
1 for f in `find . -iname "*.JPG" -size -500k`; do mv ${f} small; done
Some times you need a new filesystem, for testing purposes or for whatever and you dont have access to a physical device. You can create a filesystem within a file as follows:
bash |copy code |?
01 dd if=/dev/zero of=myfsys bs=512M count=1 # creating a 512M zeros file02 mke2fs myfilesys # creating a file system out of the file03 04 05 mount myfilesys /mnt -o loop=/dev/loop0 # mounting it as a loop de犀利士
06 07 vice08 09 10 mkdir /mnt/point1 # creating a mount point11 12 mount /dev/loop0 /mnt/point1 # mounting13 14 df /mnt/point1/ # its alive!15