This find oneliner displays all the broken links in the current directory. By adding xargs rm, you can delete all the broken links found. Find all the broken links: $ find . -type l -exec sh -c “file -b {}…
This find oneliner displays all the broken links in the current directory. By adding xargs rm, you can delete all the broken links found. Find all the broken links: $ find . -type l -exec sh -c “file -b {}…
All this 5 oneliners do the same thing. Remove the empty files with a certain extension (.txt in my example), with the Linux and Unix powerfull find command: One: $ find /path/to/dir -type f -name ‘*.txt’ -empty -exec rm {}…
In Gnome, gEdit creates some backup copies of edited files. This backups have the name of the original files, but with a tilde character added at the ending of the filename. After exiting gEdit, these files do dissapear. From what…
In this article I will show you 10 find oneliners, for manipulating the file and folder permissions. 1. Add execution rights for the user to all the files in the current directory: find . -type f -exec chmod u+x {}…
In this article I will show you how to delete the empty directories from a directory tree with the find command. I will use the find command, combined with rmdir. The rmdir command deletes only the empty directories and doesn’t…