5 ms·
Great points about robustness. For the first time ever I had to deal with xargs and find together last week. Bear in mind I've been using Unix for about 20 yea
by cssmoo 12y ago
Great points about robustness.
For the first time ever I had to deal with xargs and find together last week. Bear in mind I've been using Unix for about 20 years now. Telling one command to null delimit stuff and another to parse the nulls is horrible. Especially seeing as this only came about because one directory happened to have a lot of files in it and the 11 year old script just went snap. I'm perhaps lucky I've never encountered this.
The author needs to take a look at powershell. Surprisingly I wrote a job site scraper in it in about 10 lines of code. Html parsing, data access etc are right there at your finger tips. That and it'll quite happily move 23TiB/1780000 files in a single incantation without wincing once.
Colour me impressed (as an old Unix die hard)
- tomsthumb 12y ago> For the first time ever I had to deal with xargs and find together last week. Bear in mind I've been using Unix for about 20 years now. I'm really curious about this. Do you have a very specific workflow that gets around that need or an alternative that would replace find + xargs? Is your job pretty niche? It just seems like I _need_ it a few times a week minimum, and I'm not really sure what would replace it off the top of my head. I do agree on powershell being quite slick. Sometimes finding what I want is a process, but so was unix in the beginning.
- cssmoo 12y agoI just don't deal with lots of files really. I tend to deal with a small number of very big ones instead and the paths have always been short. To replace it, no idea.
- tomn 12y agoUsing find with -exec works well and avoids this kind of problem, though that may well be a gnu specific thing.
- icantthinkofone 12y agoPowershell is a Unix workalike. That's why you like it so much.
- xenophonf 12y agoIt's more like the .NET CLR version of a Lisp read-eval-print loop, and _that's_ why he likes it so much. ;) But more seriously, it only looks like the Unix shell. Operators like '|' can have very different semantics, especially when passing objects around and whatnot.
- platz 12y agoKind of makes me wish there was a clojure version of powershell. In what form I'm not sure exactly, but it should be doable because clojure already runs on the .net CLR.
- alayne 12y agoPowershell is nothing like a Unix shell. It uses a completely different model of operation that is object based.
- michaelsbradley 12y agoGNU parallel might be a good alternative to xargs for your needs: http://www.gnu.org/software/parallel/man.html#DIFFERENCES-BETWEEN-xargs-AND-GNU-Parallel http://www.gnu.org/software/parallel/man.html#DIFFERENCES-BE... http://www.gnu.org/software/parallel/parallel_tutorial.html http://www.gnu.org/software/parallel/parallel_tutorial.html