Being able to see seconds in the UNIX ‘ls’ command is particularly useful for comparing/viewing recently created files, because by default ‘ls -l’ will simply show “Today” in the date/time field for such files. Here’s how you can make ‘ls’ show also the seconds (and not only seconds but also microseconds, for that matter… oh […]
Bash
Topics related to the “Borne Again SHell” (bash)
The linux ‘find’ command by example
find ~ -type f -name “.*” FIND the hidden files in your home directory (~) find . -name *~ -type f -delete Delete all files ending in ~ find . -name *.svn -type d -print0 | xargs -0 /bin/rm -rf Delete all .svn files under current dir find . -name *.c -perm /u+x -type f […]
Bash quick cheatsheat (‘if’ checks and other useful commands)
Creating this post to dump here various bash shell and script commands, tips and tricks which I found useful in my everyday work. Will update it with new info continually… ——— Check in bash if a file exists or not and do something in each case: if [ -f $FILE ]; then echo “File $FILE […]