BASH script to remove numeric prefix from files downloaded from scribd

Scribd is a great service, offering PDF downloads of a variety of content.  Unfortunately there is an ugly 8 digit (random?) number prefixed on each file downloaded.


It’s not descriptive, and it makes alphabetic sorting of the files downloaded impossible.  Here’s a small BASH shell script that will remove the first 9 characters (8 digits and the – character) from all pdf files in a directory.

for f in *.pdf; do
[ ! -f $file ] && mv "$f" $file

Create the above in a file, save it, and be sure to use chmod +x filename to make the shell script executable.

About the author


I'm an all around computer junkie, interested in many aspects of programming, operating systems, and enterprise IT technologies. I love Mac OS X, Linux, and Windows and more!

Need a robust off the grid power solution?

Off the grid, portable power solution for your devices - big and small

Check out the Goal Zero Yeti line of power solutions - powerful Li-Ion batteries that you can charge from Solar Panels or via wall charger.  These are the ultimate in portable electric power!