Tips & Tricks
Everything you ever wanted to know but never dared to search for...

Loop / iterate through files in a map

for f in p*.xml; do echo $f; done
for f in *xml; do touch${f%xml}bak; done

Find all files bigger than 100M in current volume and sort them by size

find / -size +100M -exec ls -kSsd {} +

Filename Expansion

echo *         ➤ abc ac abcd ahhx askc
echo a*c       ➤ abc ac askc
echo a?c       ➤ abc
echo a[bh]*    ➤ abc abcd ahhx
echo a[c-z]*   ➤ ac ahhx askc
echo a[!c-z]*  ➤ abc abcde

Create a standard .iso image from a folder

hdiutil makehybrid -iso -joliet -o drivers.iso /Users/abc/Desktop/Drivers

Gaetano Causio © | Privacy Policy | Disclaimer