wrote CLI in C++ to sort files. it’s very simple, just download and use. if you a photographer, video editor or just need to sort some files, you welcome (link in post)
wrote CLI in C++ to sort files. it’s very simple, just download and use. if you a photographer, video editor or just need to sort some files, you welcome (link in post)
lscan be piped safely if you use--zero:ls --zero *.txt | xargs --null -I {} mv {} /home/user/DocumentsWhile the above is a pretty silly example, one reason why you might want to do this is that
xargshas a-P/--max-procsargument, that runs N commands in parallel. So you could do something like the following to gzip four files in parallel:ls --zero *.txt | xargs --null -n1 -P4 gzipThis is a bit simpler than using the equivalent
find . -maxdepth 1 -name '*.txt' -print0 | xargs --null -n1 -P4 gzipWhile the later is more reliably available. Use this in scripts you distribute. And also finds
-execinstead of|xargs.Both
findandxargsare POSIX commands, so there’s something wrong with your OS if you are missing either, andfinddoes not have an equivalent of-P. Granted,-Pis an extension, but it is supported by GNU’s, OpenBSD’s, FreeBSD’s, and BusyBox’sxargscommands, and probably also by others, so it is reasonable to assume that it is available unless you are targeting some obscure OS