I found this command online, but not sure what the -@
means.
find . -type f -mtime -29 -mtime +21 | zip -@ 061110_061201.zip
If you run man zip
you can read:
-@ file lists. If a file list is specified as -@, zip
takes the list of input files from standard input instead of from the
command line.
You can refer to this question on Unix & Linux Stack Exchange to better understand the difference between standard input and command line argument.
grep -l 'some-word' . -R | zip -@ ....
) b) owned by a particular user: find . -type f -user someuser | zip -@ ...
) c) zip only duplicate files (fdupes . | zip -@ ...
) ... Possibilities are infinite.
– muru
Sep 14 '15 at 15:23
The manual has this option described as (see man zip
from command line or an online version)
-@ Take the list of input files from standard input.
Only one filename per line.
So to explain your command. This will have an undetermined amount of results:
find . -type f -mtime -29 -mtime +21
and the result of this is accepted by the 2nd part of the command but only 1 result at once but still processed to the same zip file.
zip -@ 061110_061201.zip
according to man zip
-@ file lists. If a file list is specified as -@ [Not on MacOS], zip
takes the list of input files from standard input instead of from the
command line. For example,
zip -@ foo
zip
utility installed, thenman zip
will not work as the manual pages will not be installed. – Burhan Khalid Sep 15 '15 at 05:34