Tag: loop
-
Move small files to separate directory in one command
Loop files under a set weight to move it to a directory. for f in `find . -iname “*.JPG” -size -500k`; do mv ${f} small; done
-
Create a filesystem in a file
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: dd if=/dev/zero of=myfsys bs=512M count=1 # creating a 512M zeros file mke2fs myfilesys # creating a file system out of the file mount…