Advertisement
xe1phix

Xe1phix-[fuser]-Cheatsheet.sh

Oct 6th, 2022
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4. ## -------------------------------------------------------------------------------------------------- ##
  5.     fuser /var/log/daemon.log       ## Show which processes use the file
  6. ## -------------------------------------------------------------------------------------------------- ##
  7.     fuser -v /home/$User            ## Show which processes are used in the home directory
  8. ## -------------------------------------------------------------------------------------------------- ##
  9.     fuser -ki $File                 ## Kills a process that is locking a file
  10. ## -------------------------------------------------------------------------------------------------- ##
  11.     fuser -k -HUP $File             ## Kills a process with specific signal
  12. ## -------------------------------------------------------------------------------------------------- ##
  13.     fuser -v 53/udp                 ## Show what PID is listening on specific port
  14. ## -------------------------------------------------------------------------------------------------- ##
  15.     fuser -mv /var/www              ## Show all processes using the named filesystems or block device
  16. ## -------------------------------------------------------------------------------------------------- ##
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement