Blog Archives

Find Trick: Print The Broken Symlinks

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 {}

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

5 Find Oneliners for removing all the empty files with a certain extension

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 {}

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

The Files Having Their Names Ending With Tilde: What Are They And How To Remove Them?

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

Tagged with: , , , , , , , , , ,
Posted in The Linux and Unix Articles!

20 Find oneliners for changing file and folder permissions

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 {}

Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!

Find Trick: How to find and delete the empty directories in a directory tree

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

Tagged with: , , , ,
Posted in The Linux and Unix Articles!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!