thorsten
(Thorsten)
1
Hi there,
is there a linux freak with us who can correct this command line:
cp (ls -rt1 /var/lib/nethserver/ibay/backup/ecodms/*.zip | tail -1) /var/lib/nethserver/ibay/backup/
Within a script, it works fine, but I can not execute it on the commend line. What is my error?
TIA
Thorsten
PS.: The command takes just the latest / newest file from the source folder and copies it to target.
ssabbath
(Walter Ferry Dissmann)
2
What does it show as a error?
Hi
This gives the latest file…
ls -t | head -1
The problem is probably with the “expansion”…
More background:
http://mywiki.wooledge.org/ParsingLs
My 2 cents
Andy
thorsten
(Thorsten)
4
-bash: syntax error near unexpected token `(’