1
vote
2answers
186 views

How batch mv files to folders created and named by modification date?

I am quite new to the terminal stuff and I just couldn't find any answer on the aforementioned subject. On my OS X, I have a folder with about 4000 pics that I'd like to move into folders that are ...
4
votes
4answers
348 views

How to shift filename numbers without collisions?

Consider this list of files: $ touch index-{1,2,3,4,5,6,7,8,9}.txt If I want to shift them down so they start at zero, it's relatively easy: $ rename --verbose 's/^index-([1-9])\.txt$/$1/; ...
4
votes
3answers
648 views

For each subfolder, sort files by name and rename them to sequential padded numbers (regardless of extension)

I have the following directory structure: . ├── event-a │   ├── album-a │   │   ├── a.jpg │   │   └── x.png │   └── album-b │   ├── a.jpg │   ├── x.png │   └── y.gif └── event-b ├── ...
4
votes
1answer
342 views

Renaming files from bash in linux

There is a bunch of files of the following format hh-mm-ss.png where hh, mm, ss are hour, minute and second. How can I rename all these files in the directory in a sequential way from 1.png til n.png ...
2
votes
2answers
194 views

Move one file at a time based from specific number in the files

Based from this question, The HTML files date format has been changed. All of the HTML files have the date such like below: 20110730dateishere dateishere is intentionally added by me in the files, ...
2
votes
3answers
984 views

sorting filenames numerically when they have non-numeric prefix

I have files in the following format: x1 x2 ... x10 x11 ... x101 ... I want to rename these files, so they all have the same name length: x001 x002 ... x010 ... I can do this with files, that don't ...