8 Basic lsof Commands Every Sysadmin Needs to Know
lsof basics - list open files on Linux and Unix (expand for timestamps and details).
In this video I introduce the 'lsof' command, found on Linux and Unix systems. I'll show you some practical examples and teach you how to explore what's happening with the filesytem in a system or process.
1:00 Which files are open?
lsof
2:56 Which processes have this file open?
lsof /var/log/nginx-error.log
4:49 Which files does process X have open?
lsof -p 1
lsof -p `pgrep ABC`
7:08 Where is the binary for this process?
lsof -p ABC | grep bin
7:44 Which shared libraries is this program using? (manually upgrading software, i.e. openssl)
lsof -p PID | grep .so
8:03 Where is this thing logging to?
lsof -p ABC | grep log
8:40 Which processes still have this old library open?
lsof grep libname.so
9:45 Which files does user XYZ have open?
lsof -u XYZ
lsof -u XYZ -i # network only
10:25 Which process is listening on Port X (or using Protocol Y)?
lsof -i :80
lsof -i tcp
11:21 Super lsof Story Time!
14:03 Exercises
My step-by-step project-based Linux course for beginners: https://www.udemy.com/course/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?referralCode=19C0A7DEE2FD53C9C09D
Free Linux Sysadmin Course Playlist: https://www.youtube.com/playlist?list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK
DigitalOcean referral link: https://m.do.co/c/0380a1db56a6
Patreon: https://www.patreon.com/tutorialinux
Official Site & e-mail list: https://tutorialinux.com/
Twitter: https://twitter.com/tutorialinux
Facebook: https://www.facebook.com/tutorialinux
Podcast: http://kernelpanicpodcast.com
Видео 8 Basic lsof Commands Every Sysadmin Needs to Know канала tutoriaLinux
In this video I introduce the 'lsof' command, found on Linux and Unix systems. I'll show you some practical examples and teach you how to explore what's happening with the filesytem in a system or process.
1:00 Which files are open?
lsof
2:56 Which processes have this file open?
lsof /var/log/nginx-error.log
4:49 Which files does process X have open?
lsof -p 1
lsof -p `pgrep ABC`
7:08 Where is the binary for this process?
lsof -p ABC | grep bin
7:44 Which shared libraries is this program using? (manually upgrading software, i.e. openssl)
lsof -p PID | grep .so
8:03 Where is this thing logging to?
lsof -p ABC | grep log
8:40 Which processes still have this old library open?
lsof grep libname.so
9:45 Which files does user XYZ have open?
lsof -u XYZ
lsof -u XYZ -i # network only
10:25 Which process is listening on Port X (or using Protocol Y)?
lsof -i :80
lsof -i tcp
11:21 Super lsof Story Time!
14:03 Exercises
My step-by-step project-based Linux course for beginners: https://www.udemy.com/course/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?referralCode=19C0A7DEE2FD53C9C09D
Free Linux Sysadmin Course Playlist: https://www.youtube.com/playlist?list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK
DigitalOcean referral link: https://m.do.co/c/0380a1db56a6
Patreon: https://www.patreon.com/tutorialinux
Official Site & e-mail list: https://tutorialinux.com/
Twitter: https://twitter.com/tutorialinux
Facebook: https://www.facebook.com/tutorialinux
Podcast: http://kernelpanicpodcast.com
Видео 8 Basic lsof Commands Every Sysadmin Needs to Know канала tutoriaLinux
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Linux Sysadmin Basics -- User Account ManagementLinux Tip | 10 Useful Linux Commands10 Questions You NEED to Ask During Your Tech Job InterviewWhat Every Sysadmin Needs to Know about Tech Debt8 Bash Shortcuts Every Linux User Should KnowLinux inodes ExplainedLinux File System/Structure Explained!Popular Linux Interview Questions for DevOps InterviewsLinux Basic Networking Commandslsof command to troubleshoot LinuX OSMy 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency)Learning the Linux File SystemBasic tmux Tutorial - Windows, Panes, and Sessions over SSHTop 10 Linux Job Interview QuestionsVim Basics in 8 Minutes3 Concepts to Master for DevOps/SRE InterviewsTop 7 Cloud Infrastructure Interview QuestionsLinux Basics -- Scheduling Tasks with CronGetting started with Ansible 02 - SSH Overview & Setup