Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow so much unix and shell goodness in this post.

Useful bits/tricks to me:

      # see what files a given program opens
      strace PROGRAM_HERE 2>&1 | grep open

      # get last pid
      echo $!
      
      # all sorts of useful commands and information on a given PID
      ls -alh /proc/PID_HERE

      # get a tree listing of all processes
      pstree -a

      # echo into a file using sudo
      echo "some text here" | sudo tee -a FILE_PATH_HERE


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: