Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. mkdir history
  4. echo foo bar > history/hist.db
  5. echo hello > test
  6.  
  7. strace ./run 2>&1 | sed -n '/^open.*WRONLY/p' | sed 's/.*"(.*)"[^"]*$/1/'
  8.  
  9. history/hist.db
  10. test
  11.  
  12. $ lsof -p PID
  13.  
  14. $ lsof -p `pidof gnome-terminal` | head -5
  15. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
  16. gnome-ter 7423 saml cwd DIR 253,2 32768 10354689 /home/saml
  17. gnome-ter 7423 saml rtd DIR 253,0 4096 2 /
  18. gnome-ter 7423 saml txt REG 253,0 338632 1220790 /usr/bin/gnome-terminal
  19. gnome-ter 7423 saml mem REG 253,0 614032 1192949 /usr/lib64/libfreetype.so.6.6.0
Add Comment
Please, Sign In to add comment