public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Adam Carter <adamcarter3@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] find atime vs lsof
Date: Sat, 27 Jul 2019 15:15:49 +1000	[thread overview]
Message-ID: <CAC=wYCHwvcNFNX_z3FwDWt7EHo66yS0vzuTdDAjQWBKyegtBBQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

Some time back i moved from vmware to virtualbox, and am currently
wondering if there are some old vmware files i can remove. Virtualbox uses
the old vmware disk files, so first i checked via atime and lsof.

Why does atime not show all the files that lsof shows were open?

Steps were;
1. start vm
2. create and save dummy file in vm
3. run lsof on vm PID
4. shut down mv
5. run find to see which files were accessed

# lsof -p 2299 | grep 'VIRTUALS/Win-10-x64'
VirtualBo 2299 adam   42u      REG              259,2       2453 10095159
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64.vmdk
VirtualBo 2299 adam   44u      REG              259,2 2146762752 10094024
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s001.vmdk
VirtualBo 2299 adam   45u      REG              259,2 2146762752 10094071
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s002.vmdk
VirtualBo 2299 adam   46u      REG              259,2 2146762752 10094011
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s003.vmdk
VirtualBo 2299 adam   47u      REG              259,2 2146762752 10094108
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s004.vmdk
VirtualBo 2299 adam   48u      REG              259,2 2146762752 10094076
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s005.vmdk
VirtualBo 2299 adam   49u      REG              259,2 2146762752 10094127
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s006.vmdk
VirtualBo 2299 adam   50u      REG              259,2 2146762752 10094050
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s007.vmdk
VirtualBo 2299 adam   51u      REG              259,2 2146762752 10094087
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s008.vmdk
VirtualBo 2299 adam   52u      REG              259,2 2146762752 10094031
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s009.vmdk
VirtualBo 2299 adam   53u      REG              259,2 2146762752 10094102
/home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s010.vmdk
VirtualBo 2299 adam   54u      REG              259,2 2146762752 10094021
<snip>

# find VIRTUALS/Win10-vbox/ -atime -1 -type f
VIRTUALS/Win10-vbox/Win10-vbox.vbox
VIRTUALS/Win10-vbox/Logs/VBox.log
VIRTUALS/Win10-vbox/Logs/VBox.log.1
VIRTUALS/Win10-vbox/Win10-vbox.vbox-prev
#

[-- Attachment #2: Type: text/html, Size: 2576 bytes --]

             reply	other threads:[~2019-07-27  5:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-27  5:15 Adam Carter [this message]
2019-07-27  9:23 ` [gentoo-user] find atime vs lsof Mick
2019-07-27  9:36   ` [gentoo-user] " Adam Carter
2019-07-27 10:06     ` Mick
2019-07-27 11:01       ` Adam Carter
2019-07-27 11:04         ` Mick
2019-07-27 11:12           ` Adam Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC=wYCHwvcNFNX_z3FwDWt7EHo66yS0vzuTdDAjQWBKyegtBBQ@mail.gmail.com' \
    --to=adamcarter3@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox