Guest User

Untitled

a guest
Feb 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. ps aux | grep vlc
  2.  
  3. pc 27636 2.1 2.3 1261964 90028 ? Sl 21:46 0:23 /usr/bin/vlc --started-from-file /media/pc/Everything/TV shows/Discovery Channel - The History Of Hacking.avi
  4. pc 28317 0.0 0.0 11748 2196 pts/0 S+ 22:05 0:00 grep --colour=auto vlc
  5.  
  6. -c c selects the listing of files for processes executing the
  7. command that begins with the characters of c. Multiple commands
  8. may be specified, using multiple -c options. They are joined in
  9. a single ORed set before participating in AND option selection.
  10.  
  11. $ lsof -wc vlc | awk '$4~"[0-9]r" && $5=="REG"'
  12. vlc 16532 terdon 16r REG 8,19 131338 69731703 /path/to/foo.avi
  13.  
  14. $ lsof -wc vlc | awk '$4~"[0-9]r" && $5=="REG"' | grep -o '/.*'
  15. /path/to/foo.avi
  16.  
  17. $ lsof -wc vlc | awk '$4~"[0-9]r" && $5=="REG"' | grep -o '[^/]*$'
  18. foo.avi
  19.  
  20. pgrep -a vlc
  21.  
  22. pgrep -a vlc | sed -r 's%^.*/([^/.]+)%1%g'
  23.  
  24. qdbus org.mpris.MediaPlayer2.vlc
  25.  
  26. /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata
  27.  
  28. | grep "xesam:title:" | cut -c 14-
Add Comment
Please, Sign In to add comment