xargs quite old

xargs quite old

Postby firwareslut » Wed Jan 30, 2013 9:14 am

Hi guys,

Is it possible to get xargs updated in the firmware? I am running some backups from my office to the NAS using SSH and I am trying to delete archives using a remote command through SSH.

On my Ubuntu machine xargs -h produces the following

Xargs version = 4.4.2

Usage: xargs [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]
[-E eof-str] [-e[eof-str]] [--eof[=eof-str]]
[-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]
[-I replace-str] [-i[replace-str]] [--replace[=replace-str]]
[-n max-args] [--max-args=max-args]
[-s max-chars] [--max-chars=max-chars]
[-P max-procs] [--max-procs=max-procs] [--show-limits]
[--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]
[--version] [--help] [command [initial-arguments]]


When I do the same on the NAS I get

Options:
-p Ask user whether to run each command
-r Do not run command if input is empty
-0 Input is separated by NUL characters
-t Print the command on stderr before execution
-e[STR] STR stops input processing
-n N Pass no more than N args to PROG
-s N Pass command line of no more than N bytes
-x Exit if size is exceeded

The remote command I am trying to execute is as follows (an example)

/bin/ls -t *.tar.tgz | /usr/bin/awk 'NR>3' | /usr/bin/xargs -I {} rm -rf {}\"

Which should remotely remove any archives found except the last 3.

Any help is appreciated.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: xargs quite old

Postby fvdw » Wed Jan 30, 2013 10:16 am

I will compile the latest version, no problem
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: xargs quite old

Postby fvdw » Wed Jan 30, 2013 10:26 am

new version attached
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: xargs quite old

Postby firwareslut » Wed Jan 30, 2013 3:07 pm

Perfect! As soon as I get out of debt in a few months I will definitely buy you a beer:P
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: xargs quite old

Postby Jocko » Wed Jan 30, 2013 4:28 pm

:beer:
I added this smiley and at least you can offer a virtual beer :-D
:beer:
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: xargs quite old

Postby firwareslut » Wed Jan 30, 2013 6:43 pm

:lmao

Thre will be enough for two don't worry, Jocko! :beer:
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am


Return to Development

Who is online

Users browsing this forum: Bing Bot and 4 guests