Bug 56166 - lsof puts different amount of spaces in output
lsof puts different amount of spaces in output
Product: Red Hat Linux
Classification: Retired
Component: lsof (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-11-13 10:56 EST by Leonard den Ottolander
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-13 10:56:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Leonard den Ottolander 2001-11-13 10:56:47 EST
Description of Problem:
lsof puts different amount of spaces in output. Not sure if this is a bug, but it is strange behaviour.

Version-Release number of selected component (if applicable):

How Reproducible:
Repeat the command a couple of times, and see that the third column shifts one space occasionally.
I observed this behaviour when cutting for a certain byte range.

Steps to Reproduce:

Actual Results:
# lsof | grep www.interstad.nl/
repeated a couple of times. Here are two example lines from two consecutive  runs:
httpd     11809    root  cwd    DIR        9,7     8192   3810092 /home/www.interstad.nl/HTML/pages
httpd     11809     root  cwd    DIR        9,7     8192   3810092 /home/www.interstad.nl/HTML/pages

Expected Results:
Same format in every run.

Additional Information:
Comment 1 Jakub Jelinek 2001-11-28 05:38:59 EST
lsof adjusts the field widths so that every printed field fits into its column,
thus it really depends on what other files are open at which point.
Normal lsof output is intended primarily for humans, so simply don't cut
on byte positions but on field positions instead.
Read the manual page about other modes of lsof operation which are meant for
parsing by other programs.

Note You need to log in before you can comment on or make changes to this bug.