File Management

inotify -watch for file to change


Here is a simple command for you. It uses inotify tools. So first you need to install : sudo yum install inotify-tools and then you can try something like this: while true; do inotifywait -r -e modify …

Delete all but some directories


I think, like me, you would have faced a lot of situations, where you wanted to delete all the files or directories in a location, leaving only the required files/directories. So, I have a directory …

cksum – compare for multiple files.


If you have to compare cksum for couple of files, the you know how cumbersome it is. So, I wrote a simple script, wherein you can create a file called cksums in the current directory and copy paste …

duff – find duplicate files.


duff – description:  […] Description : Duff is a command-line utility for quickly finding d […] uplicates in a given set of files […]  and now time to execute :  find . -type f …

vim mappings for multiple files.


If you open multiple files in vim with command line option. Then the only way to move between the files is “:n” and “:N”. There is a easier way to do this. Just add mappings for this in vimrc. Here is …

rpmconf – Tool to handle rpmsave and rpmnew files


Install the utility: sudo yum install rpmconf Description: […] And finally run the utility: sudo rpmconf -a and if there is a conflict or rpmsave or rpmnew file, then you will see something …

symlinks -delete all invalid soft links in Linux/Fedora


First of all, install symlinks if it is not installed : sudo yum install symlinks and here is the description: […] and the help for the same: […] symlinks: scan/change symbolic links – …

Backup of files in the directory.


I was working on some scripts and the changes that I was making in the scripts was very dynamic, which I did want to keep backing up in the version control system. But for the peace of my mind, I …

Compare files excluding certain lines.


Quick tip, you can use any expression for the sed commands in the (). With this trick you can redirect the stdout of 2 commands to the diff command. This might become very useful, if you want to …

Get yourself some conkyrc files.


If you are looking for some nice conkyrc files, then you can head over to : Ubuntu Forums In this thread you can see some very nice conkyrc files with screenshots. You can browse through the thread …

some interesting alias


For this time, I will just give you a link to to bashrc file. Head over there and see some very interesting aliase’s.


Empty a file


<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a …

This website uses cookies to ensure you get the best experience on our website. Learn more Got it