7

I found this command online, but not sure what the -@ means.

find . -type f -mtime -29 -mtime +21 | zip -@ 061110_061201.zip
muru
  • 197,895
  • 55
  • 485
  • 740
clayton33
  • 173
  • 1
  • 5

3 Answers3

8

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.

hg8
  • 13,462
4

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
Rinzwind
  • 299,756
2

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
Archemar
  • 672