I'm looking for the easiest way to tar the most recent file in directory. The command below locates the correct file, but I don't know how to tar it from the output:
find /home/user -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "
And also I must output the progress.
To create a tar file with GNU tar append:
Update: GNU tar with progress bar (with
pv
):Output (example):