Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. $ unpack *.tar -d /home/c0rp/this_is_tar
  2. $ unpack *.rar -d /home/c0rp/this_is_rar
  3. $ unpack *.tar.gz -d /home/c0rp/this_is_targz
  4. $ unpack *.zip -d /home/c0rp/this_is_zip
  5. $ unpack *.7z -d /home/c0rp/this_is_7z
  6.  
  7. $ pack some_name.tar /home/c0rp/for_tar1 /home/c0rp/for_tar2
  8. $ pack some_name.rar /home/c0rp/for_rar1 /home/c0rp/for_rar2
  9. $ pack some_name.tar.gz /home/c0rp/for_targz1 /home/c0rp/for_targz2
  10. $ pack some_name.zip /home/c0rp/for_zip1 /home/c0rp/for_zip2
  11. $ pack some_name.7z /home/c0rp/for_zip1 /home/c0rp/for_7z
  12.  
  13. DESCRIPTION
  14. 7-Zip is a file archiver with the highest compression ratio. The pro-
  15. gram supports 7z (that implements LZMA compression algorithm), LZMA2,
  16. XZ, ZIP, Zip64, CAB, RAR (if the non-free p7zip-rar package is
  17. installed), ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem
  18. images and DEB formats...
  19.  
  20. $ 7z a file.tar.gz file
  21. $ 7z a file.zip file
  22. $ 7z a file.7z file
  23. $ 7z a file.gzip file
  24.  
  25. $ 7z x file.tar.gz
  26. $ 7z x file.zip
  27. $ 7z x file.7z
  28. $ 7z x file.gzip
  29.  
  30. $ cd /tmp
  31. $ touch testfile
  32. $ for alg in {zip,gzip,7z,tar.gz,rar};do 7z a testfile."$alg" testfile;done
  33. $ ls testfile*
  34. testfile.7z
  35. testfile.gzip
  36. testfile.rar
  37. testfile.tar.gz
  38. testfile.zip
  39.  
  40. $ for arch in testfile.*;do binwalk "$arch" | sed -n '4p' | awk {'print $3'};done
  41. 7-zip
  42. gzip
  43. 7-zip
  44. gzip
  45. Zip
  46.  
  47. sudo apt-get install dtrx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement