3 ms·
Interestingly, that didn't work. Strangely "jot -w file 8000000 1 | xargs touch" worked. I'm going to try to replicate this because I sense some kind of tomfo
by bifrost 5y ago
Interestingly, that didn't work.
Strangely "jot -w file 8000000 1 | xargs touch" worked.
I'm going to try to replicate this because I sense some kind of tomfoolery.
- scottlamb 5y agoThe command I quoted works verbatim on one of my Ubuntu systems. It's ~60X faster than eg "for i in $(seq 1 8000000); do touch $i; done" because it creates many files per fork+exec, and fork+exec is a much heavier operation than creating an empty file.
- loeg 5y agoSeq isn’t installed by default in FreeBSD, while jot is. That’s all. I think seq may be part of coreutils and installed as ‘gseq’? Not entirely sure.
- bifrost 5y agoseq is in /usr/bin, its default in FreeBSD as on FreeBSD 9.
- bifrost 5y agoI'm actually not sure why it failed after generating 1.3M files, no error messages or anything, it was weird. Initially I thought maybe it was like an inode/fd issue or something but no.