Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. sudo mount -o loop Sample.iso /tmp/mnt
  2. cd /tmp/mnt
  3. tar-cvf /tmp/sample.tar *
  4. sudo umount /tmp/mnt
  5.  
  6. #!/bin/bash
  7. sudo mount -o loop Sample.iso /tmp/mnt
  8. cd /tmp/mnt
  9. tar -cvf /tmp/sample.tar *
  10. #Got to the old working directory. **NOTE**: OLDPWD is set automatically.
  11. cd $OLDPWD
  12. #Now we're able to unmount it.
  13. sudo umount /tmp/mnt
  14.  
  15. sudo mount -o loop Sample.iso /tmp/mnt
  16. cd /tmp/mnt
  17. tar -cvf /tmp/sample.tar *
  18. sudo umount /tmp/mnt
  19.  
  20. sudo mount -o loop Sample.iso /tmp/mnt
  21. ( cd /tmp/mnt && tar -cvf /tmp/sample.tar * )
  22. sudo umount /tmp/mnt
  23.  
  24. ( cd dir && somecommand )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement