Step 1/1: Who has a file open

lsof lists open files (in Linux directories and network connections count too). lsof FILE shows only the processes that have it open: COMMAND, PID, and FD, the file descriptor. lsof -i :80 shows who uses port 80, lsof -p PID what one process has open.

$ lsof app.log
Fundamentalslsofprocess
Who has this file open
Some process keeps build.log open, so it is not safe to delete. Find out which process it is (its command name and process ID).

This exercise needs real Linux

The commands it uses (processes, networking and more) are not in the simulator. Switch to real Linux and the exercise runs in a real Linux system inside your browser.

watchNext lesson:vmstat