Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. find . -name '.txt.' -print
  2.  
  3. ./InstructionManager.txt.0
  4. ./InstructionManager.txt.1
  5.  
  6. zip ./InstructionManager.txt.0.zip ./InstructionManager.txt.0
  7. mv ./InstructionManager.txt.0.zip ./InstructionManager.txt.0
  8. zip ./InstructionManager.txt.1.zip ./InstructionManager.txt.1
  9. mv ./InstructionManager.txt.1.zip ./InstructionManager.txt.1
  10.  
  11. find . -name '*.txt.*' -print -exec zip '{}'.zip '{}' ; -exec mv '{}'.zip '{}' ;
  12.  
  13. file InstructionManager.txt.*
  14.  
  15. InstructionManager.txt.0: Zip archive data, at least v1.0 to extract
  16. InstructionManager.txt.1: Zip archive data, at least v1.0 to extract
  17.  
  18. find . -name '*.txt.*' -exec zip '{}.zip' '{}' ;
  19.  
  20. find . -name '*.txt.*' -print0 | xargs -0 -r -n1 -I % sh -c '{ zip %.zip %; mv %.zip %;}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement