Unix Shell Script Tutorials, Tips & Tricks

Some Useful Unix File Finding Commands

Some Useful Unix File Finding Commands

Following are some bunch of commands that might be useful if you want to find files in unix/linux. Large Files Find files larger than 10MB in the current directory downwards… find . -size +10000000c...

Shell Script to Rename & Move files in Unix

Problem Statement: I have few files in source directory. I have to move them to another destination directory. The source directory have *.txt files that needs to be moved to destination directory. The destination...

Generate Random Number in UNIX Shell Script

Generate Random Number in UNIX Shell Script

RANDOM is a peculiar shell variable, but useful nonetheless. Peculiar because its value changes each time it is referenced (yes, this is by design). As you may have already guessed, RANDOM is a random...

Writing Functions in Shell Script

Writing Functions in Shell Script

Have you ever written a huge Unix script and thought you would have divided this script into pieces of reusable code? Well don’t worry. You can create functions in unix shell script and make...