bash functions

bash function for rpm whatprovides


Sometimes some simple one-liner function can save you a lot of time, like-

Directories with maximum number of files


Lot of times, I want to find the directories with maximum number of files and so I wrote this quick function to do exactly the same  

mv command with progress


When moving large files/directories, I would like to see the progress. Idea for this is to use rsync with progress and remove source files. But that option does not remove the empty directories left …

Disk usage by file type


Trying to find the total usage for each of the file types by extension, then here is a quick bash function for you : disk_usage_type () { find . -name '*'$1 -ls | awk ' BEGIN{ a[0]="Bytes"; a[1]="KB"; …

nice little bash function to search for running processes


Here is a nice little handy function that I use very regurlarly. You can use this function with parameter to just grep for that or just type psa to see all the running processes. Just put this in your …

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