I just wrote a script that generated hundreds of files and stored them in a directory ~/foo. These files are ~/foo/X-file where X ranges from X=1 to X=900. My problem is that I would like to view these files in numerical order, but the files are not padded with zeros. Thus the directory contains 17-file and 544-file for example. Is there a way to pad these files with leading zeros?
How can I pad lots of file names with zeros in a directory?
files;rename