[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Query about .xsession-errors file



On 10/09/2014, davidson@ling.ohio-state.edu
<davidson@ling.ohio-state.edu> wrote:
> On Tue, 9 Sep 2014, Jonathan Dowland wrote:
>
>> On Wed, Sep 10, 2014 at 01:54:08AM +0800, Bret Busby wrote:
>>> The file has (kind of) gone, now (it is no longer accessible, but,
>>> appears to still exist, in the ether of the unknown; still taking up
>>> disc space, whilst, in theory, non-existent),
>>
>> A file continues to use up disk space until all open file handles are
>> closed.
>> Quite likely Xorg still has the file open, even though you've removed all
>> the
>> hard links (paths) to it on the filesystem. If you still have the system
>> up in
>> the same state, you might see it in /proc/$(pidof Xorg)/fd (or it might
>> be
>> another process other than Xorg, or I might be wrong entirely)
>
> if you have lsof installed, you can find out what processes are still
> using the deleted file quite easily:
>
>   $ lsof |grep '\.xsession-errors'
>
> might produce lines like
>
>   xterm 2237 busbyenator 1w REG 8,1 0 359981
> /home/busbyenator/.xsession-errors (deleted)
>   xterm 2237 busbyenator 2w REG 8,1 0 359981
> /home/busbyenator/.xsession-errors (deleted)
>
> the second field is the pid.  the fourth field is the file descriptor
> (in this case suffixed with 'w', indicating the process has write
> access).
>
> the lines above indicate that the xterm process with pid 2237 is
> writing its standard output (fd 1) and standard error (fd 2) to a file
> formerly known to the filesystem as .xsession-errors, and which can
> still be accessed at /proc/2237/fd/1 (and at /proc/2237/fd/2).
>
> so, in the case above,
>
>   $ cat /proc/2237/fd/1
>
> will output the contents of the file formerly known to the filesystem
> as .xsession-errors, and
>
>   $ cp /proc/2237/fd/1 preciousss_xsession-errors
>
> saves them for posterity.
>
> please note, obviously, that pid 2237 is just an example.
>
> -wes
>



What I get now, is

"
:~$ lsof |grep '\.xsession-errors'
nautilus   2366        bret   54u      REG                8,8
0    1169162 /home/bret/.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
(deleted)
"

Running ls -l, gives

"
:~$ ls -l .xsession-errors
-rw------- 1 bret bret 0 Sep 10 00:23 .xsession-errors
"

So, I assume that, for the present, all is well with it, as it
(amongst other things) has read and write access, and, that nothing
more should be done, at this time, about the particular file, unless I
am advised otherwise.

I note that, with that file that is being accessed by Nautilus,
assuming that the number 1169162 , is the size of the file, I have
tried, but, apparently, can not reduce that to zero, as that number
does not change, with my attempts.

"
:~$ lsof |grep '\.xsession-errors'
nautilus   2366        bret   54u      REG                8,8
0    1169162 /home/bret/.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
(deleted)
bret@bret-dd-workstation:~$ cp .xsession-errors
.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
bret@bret-dd-workstation:~$ lsof |grep '\.xsession-errors'
nautilus   2366        bret   54u      REG                8,8
0    1169162 /home/bret/.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
(deleted)
bret@bret-dd-workstation:~$ lsof |grep '\.xsession-errors'
nautilus   2366        bret   54u      REG                8,8
0    1169162 /home/bret/.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
(deleted)
bret@bret-dd-workstation:~$ >
.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
bret@bret-dd-workstation:~$ lsof |grep '\.xsession-errors'
nautilus   2366        bret   54u      REG                8,8
0    1169162 /home/bret/.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
(deleted)
bret@bret-dd-workstation:~$ >
.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX (deleted)
bash: syntax error near unexpected token `('
"

However, in having closed all windows in the File Browser (as I had
assumed that that was the Nautilus, that was accessing the file,
before the above commands, which appears to have not ceased the
accessing of the file), and, then, after running the above commands,
opening the File Browser, and, examining the file information, it
shows the filesize to be zero, and, ls -l gives

"
:~$ ls -l .local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
-rw------- 1 bret bret 0 Sep 10 15:09
.local/share/Trash/info/.xsession-errors.trashinfo.H87KLX
"

so, I do not know what that number 1169162, shown in the lsof output,
represents.

But, apart from what that number represents, as I have said, the
problem appears to have been disappeared.

-- 
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
 Chapter 28 of Book 1 of
 "The Hitchhiker's Guide to the Galaxy:
 A Trilogy In Four Parts",
 written by Douglas Adams,
 published by Pan Books, 1992

....................................................


Reply to: