Bulk renaming files can be done with the rename command. It shares many similarities with cp and mv, but its simplicity can be so staggering that its difficult to figure out how to use it. If we just type...
Learn MoreAlthough many alternatives exist, I like using vi for all my command line editing needs. To save changes, I usually use SHIFT + Z + Z, exiting vi under most circumstances. But sometimes, this trick...
Learn MoreShell Scripts (BASH Scripts) can access command line parameters using the the variables $1, $2, $2 and so forth, up to $9. In fact, more parameters can be accessed by using curly brackets, like ${10}, ${187}...
Learn MoreWe can access parameters passed via the command line in our PHP shell scripts. Those are stored as an array in the variable $argv. Consider this: #!/usr/bin/php <?php echo var_dump($argv); echo...
Learn MoreIf you’ve ever tried to decompress a file that ends in tar.bz2 using the tar command, you’ll have noticed that it doesn’t work. That’s because the tar command does not understand the...
Learn More