Skip to content

Commit 857777a

Browse files
authored
Fix typo in LSOF (#1520)
1 parent df08ba4 commit 857777a

File tree

1 file changed

+3
-1
lines changed
  • common-content/en/module/tools/process-spelunking

1 file changed

+3
-1
lines changed

common-content/en/module/tools/process-spelunking/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Use what you learned in the previous exercise, to find the *PID* of this program
275275
Now run `lsof -p 1234` (replace 1234 with the *PID* of the program).
276276
The `-p` flag tells `lsof` that we're only interested in the files opened by that process; without that option `lsof` will show everything that it can show.
277277

278-
Can you find the FD of the `exercise_2.py` file?
278+
Can you find the FD of the `exercise_2_file.txt` file?
279279

280280
===[[Answer]]===
281281
If I run `lsof` on the program, I see this.
@@ -306,6 +306,8 @@ python3 65262 ariane 3r REG 253,0 0 262147 /home/ariane/programmin
306306
The *FD* column says `3r`.
307307
This means the file is on *FD* 3.
308308
(The `r` suffix, means it is opened for reading.)
309+
310+
Note that the file `exercise_2.py` does not appear in the list because, by the time lsof is executed, Python has already read its contents into memory and no longer holds an open file descriptor.
309311
{{</tabs>}}
310312

311313
### Standard Input, Output, and Error

0 commit comments

Comments
 (0)