85,859 reputation
1093204
bio website
location European Union
age
visits member for 2 years
seen 6 hours ago

2h
awarded  Enlightened
3h
awarded  Nice Answer
6h
revised Solving “mv: Argument list too long”?
prefer the more reliable, shorter and portable -0 over -d '\n' (-d was after mv btw).
6h
comment zsh solutions to “the argument list is too long”
that also recurses in the sub-directories which was not asked for.
6h
revised zsh solutions to “the argument list is too long”
edited body
6h
comment zsh solutions to “the argument list is too long”
That will also break on file names that contain spacing or quoting characters.
6h
comment zsh solutions to “the argument list is too long”
That is not universal, that's FreeBSD/NetBSD/OS/X specific (for -E, -iregex, -J that are not standard). (ITYM xargs, not xargz btw)
6h
revised zsh solutions to “the argument list is too long”
added 465 characters in body
6h
answered zsh solutions to “the argument list is too long”
7h
answered why strace ignores my alias for rm?
7h
revised Can I specify a redirected input before a compound command?
added 313 characters in body
7h
comment Can I specify a redirected input before a compound command?
@DeerHunter, << EOF involves creating a temp file, filing it up and then open it, read it and interpret as you read it. It's bound to be less fast, though probably not noticeably as it's all going to happen in memory anyway.
11h
reviewed Leave Open Passing environment variable to PHP on the command-line
12h
revised Can I specify a redirected input before a compound command?
added link supplied by Stuart in comments.
12h
answered Can I specify a redirected input before a compound command?
13h
revised Is it possible to use `find -exec sh -c` safely?
added 363 characters in body
13h
revised Is it possible to use `find -exec sh -c` safely?
added 363 characters in body
15h
comment Replace several strings with other string in several files
sed is a stream editor, vi is a visual text file editor, built on top of ex/ed (and the s command is an ex command in vi). Most sed implementations don't have a -i. ex and ed are standard Unix commands. So yes, it can be done with some sed implementations, but that is not to say it is the right tool.
15h
comment Estimate compressibility of file
I don't know if that's equivalent (as python is not by cup of coffee ;-b)), but that gives slightly different results (even for very large files where the gzip header size overhead can be ignored), possibly because zlib.compressobj uses different settings than gzip (I find that it's closer to gzip -3) or maybe because zlib.compressobj compresses each chunk in isolation (as opposed to a stream as a whole). In any case both approaches should be good enough. I find that perl is slightly faster.
17h
answered Is it possible to use `find -exec sh -c` safely?