shuf -zn1 -e *.jpg | xargs -0 cp -vt /home/myspace/
result i.e. Image00005.jpg
BUT, I want to rename the file at the same time i.e. Image00005.jpg to Image.jpg
Tried:
shuf -zn1 -e *.jpg | xargs -0 cp -vt /home/myspace/image.jpg
cp: failed to access '/home/twitter/image.jpg': No such file or directory
Any idea?
/home/myspace
?/home/twitter
? O.o Also:-t
always expects a directory. – muru Aug 24 '17 at 10:21