Bug 56166 - lsof puts different amount of spaces in output
Summary: lsof puts different amount of spaces in output
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lsof   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-13 15:56 UTC by Leonard den Ottolander
Modified: 2007-04-18 16:38 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Leonard den Ottolander 2001-11-13 15:56:47 UTC
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):
lsof-4.51-1

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:
1. 
2. 
3. 

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 10:38:59 UTC
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.