glob - Why do some linux commands work with a "*" in a list of files but others do not? -


why does, instance,

ls -1 /path/to/something/data*data/file*.txt  

work fine, while following returns error:

tar -xzvf *tar.gz tar: evsclient-v.0.0.6.tar.gz: not found in archive tar: evsclient-v.0.0.7.tar.gz: not found in archive 

the -f option tar expects 1 argument specify file process. if using glob expression have tar -xzvf , there multiple files expanded result, files after first 1 taken regular arguments tar, not option argument -f.

since using -x, tar in extraction mode, , taking other files name of files extracted archive operating on.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -