3 ms·
Exploring permutations and a mystery with BSD and GNU split filenames
- aplorbust 9y ago"In fact, I vaguely remember splitting large files into smaller ones with numerical filenames, which I prefer. I also remember not having to worry about suffixes in the past. But numerical filenames didn't seem to be an option with split installed on Mac OS X - there was no mention of it in the manual." If splitting by line, BSD csplit can output numerical filenames. wc -l file 4000 csplit -s -n 4 file '/$/' '{3998}' ls xx???? xx0000 xx0001 xx0002 ... xx3999
- jwilk 9y agoInstead of for n in {1..456977}; do echo a >> input.txt; done you could do yes | head -n 456977 > input.txt On my system the latter is ~500 times faster.
- JdeBP 9y agoIf you ever come across this comment, author, note that to some of your readers this renders as a very long, but entirely blank, page.