Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition files do not have sort-friendly filenames #12

Closed
alexhunsley opened this issue Aug 19, 2019 · 2 comments
Closed

Partition files do not have sort-friendly filenames #12

alexhunsley opened this issue Aug 19, 2019 · 2 comments

Comments

@alexhunsley
Copy link

alexhunsley commented Aug 19, 2019

If I generate partition files with the name 'part', I end up with files like this:

part.0
part.1
part.2
...
part.10
part.11
...
part.100
part.101

These filenames aren't 0-padded so don't sort into a logical order:

part.0
part.1
part.10
part.11
part.12
part.13
part.14

Could we have an option for generating 0-padded filenames please? i.e. part.000, part.001, etc.

@martymac
Copy link
Owner

Hello @alexhunsley,

First of all, thanks for using fpart and for your feedback!

Unfortunately, that is not as simple as it seems : padding is just impossible in live mode as you do not know how many partitions will be generated (so you don't know how many 0's you have to prepend).

As I do not want different naming schemes for live vs non-live mode, I prefer leaving the things as they are, even for standard mode.

I am sure you can get around the sorting issue using a numerical sort (e.g. option -n for the sort utility).

Hope that helps,
Best regards,

Ganael.

@alexhunsley
Copy link
Author

Ah that's a good point! Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants