FTLinuxCourse - Tin tổng hợp mới nhất không thể bỏ lỡ
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính
No Result
View All Result
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính
No Result
View All Result
FTLinuxCourse - Tin tổng hợp mới nhất không thể bỏ lỡ
No Result
View All Result

Exploring Unix/Linux lsof commands

admin by admin
March 30, 2020
in Lập Trình Linux
1
Exploring Unix/Linux lsof commands



In this session we will be exploring Unix lsof commands

In a linux platform all the activity is  file based. If we are going to check a network connection or if we want to check a process or if we want to check a user readable file. Let’s see the different commands that can be used to check it.

lsof  This will provides a complete list of all open files in the system
FD – Represents the file descriptor
cwd      Current Working Directory
txt        Text file
mem     Memory mapped file
mmap   Memory mapped device
Type – Specifies the type of the file
REG    Regular file
DIR     Directory
FIFO    First In First Out
CHR     Character specific file
lsof -c ssh -c init This is used to list all the open files starting with ssh or init
lsof -u [user] This is used to find the list of files opened by a specific user, and if you want to exclude files opened by a specific user use lsof -i -u^root
kill -9 ‘lsof -t -u [user]’ this is used to list and kill all process used by a specific user.
lsof +d [directory] This is used to find the list of files opened in a specific directory, and if you like to use it in a recursive mode then use “+D”
lsof -i This is used to list all the network connections opened in the system
lsof -i TCP If you need to check a TCP or UDP connection. and if you are very specific to port no you can give as lsof -i TCP:80
lsof -i TCP:1-1024 you can use this for a range of open ports also like this.
lsof -p 1 This is used to list a specific open process ID files

Nguồn:https://ftlinuxcourse.com/

Xem thêm Bài Viết:

  • Trải nghiệm mới hay ho với hướng dẫn cài Mac Os trên vmware
  • Bật mí cách cài đặt ssl miễn phí lên Let’s Encrypt
  • Tuyệt chiêu tạo usb boot kali linux đơn giản dành cho bạn
  • Hướng dẫn chi tiết từ A – Z các bước cài đặt Python trên Windows 10
  • Bật mí quy trình cài đặt Kali Linux trên Vmware đúng chuẩn và chi tiết
Tags: Youtube
Previous Post

🔥TRỰC TIẾP: Toàn cảnh "Lễ Tang" diễn viên Mai Phương, Hạn chế người vào viếng ?

Next Post

Ốc Thanh Vân bức xúc vì hình ảnh Mai Phương qua đời bị phát tán trên mạng

Next Post
Ốc Thanh Vân bức xúc vì hình ảnh Mai Phương qua đời bị phát tán trên mạng

Ốc Thanh Vân bức xúc vì hình ảnh Mai Phương qua đời bị phát tán trên mạng

Comments 1

  1. முத்து குமார் says:
    3 years ago

    lsof command to find open port with defined range is new to know. Description is useful for reference .
    Great start Mr.Expert eagarly waiting for your next video

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Xem Thêm

Những điều bạn có thể chưa biết về Thánh sim Hi Vietnamobile

Những điều bạn có thể chưa biết về Thánh sim Hi Vietnamobile

January 17, 2021
Xiaomi Mi 10 Pro thiết kế thời thương, màn hình cong ấn tượng

Xiaomi Mi 10 Pro thiết kế thời thương, màn hình cong ấn tượng

June 1, 2021
Địa chỉ in bao bì nhựa tại Đà Nẵng chiết khấu cao

Địa chỉ in bao bì nhựa tại Đà Nẵng chiết khấu cao

January 26, 2021
Địa chỉ bán đèn tuýp LED Philips uy tín và chất lượng trên thị trường?

Bán đèn tuýp led Philips – Skyled

July 27, 2020
Lựa chọn chủ đề in áo thun phù hợp

Lựa chọn dịch vụ in áo thun cotton cần lưu ý gì?

August 2, 2020
Cần xác định được điểm đặt pallet cao nhất để mua xe

Bí quyết chọn mua xe nâng điện đẩy tay

August 3, 2020

Về Chúng Tôi

Báo ftlinuxcourse.com 24h – Đón xem những tin tức mới nhất về tình hình chính trị, xã hội, an ninh trật tự, văn hóa – giải trí, thể thao, thông tin trong ngày.

  • Liên Hệ
  • Chính Sách Bảo Mật

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.