Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] find atime vs lsof
Date: Sat, 27 Jul 2019 05:16:07
Message-Id: CAC=wYCHwvcNFNX_z3FwDWt7EHo66yS0vzuTdDAjQWBKyegtBBQ@mail.gmail.com
1 Some time back i moved from vmware to virtualbox, and am currently
2 wondering if there are some old vmware files i can remove. Virtualbox uses
3 the old vmware disk files, so first i checked via atime and lsof.
4
5 Why does atime not show all the files that lsof shows were open?
6
7 Steps were;
8 1. start vm
9 2. create and save dummy file in vm
10 3. run lsof on vm PID
11 4. shut down mv
12 5. run find to see which files were accessed
13
14 # lsof -p 2299 | grep 'VIRTUALS/Win-10-x64'
15 VirtualBo 2299 adam 42u REG 259,2 2453 10095159
16 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64.vmdk
17 VirtualBo 2299 adam 44u REG 259,2 2146762752 10094024
18 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s001.vmdk
19 VirtualBo 2299 adam 45u REG 259,2 2146762752 10094071
20 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s002.vmdk
21 VirtualBo 2299 adam 46u REG 259,2 2146762752 10094011
22 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s003.vmdk
23 VirtualBo 2299 adam 47u REG 259,2 2146762752 10094108
24 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s004.vmdk
25 VirtualBo 2299 adam 48u REG 259,2 2146762752 10094076
26 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s005.vmdk
27 VirtualBo 2299 adam 49u REG 259,2 2146762752 10094127
28 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s006.vmdk
29 VirtualBo 2299 adam 50u REG 259,2 2146762752 10094050
30 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s007.vmdk
31 VirtualBo 2299 adam 51u REG 259,2 2146762752 10094087
32 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s008.vmdk
33 VirtualBo 2299 adam 52u REG 259,2 2146762752 10094031
34 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s009.vmdk
35 VirtualBo 2299 adam 53u REG 259,2 2146762752 10094102
36 /home/adam/VIRTUALS/Win-10-x64/Windows 7 x64-s010.vmdk
37 VirtualBo 2299 adam 54u REG 259,2 2146762752 10094021
38 <snip>
39
40 # find VIRTUALS/Win10-vbox/ -atime -1 -type f
41 VIRTUALS/Win10-vbox/Win10-vbox.vbox
42 VIRTUALS/Win10-vbox/Logs/VBox.log
43 VIRTUALS/Win10-vbox/Logs/VBox.log.1
44 VIRTUALS/Win10-vbox/Win10-vbox.vbox-prev
45 #

Replies

Subject Author
Re: [gentoo-user] find atime vs lsof Mick <michaelkintzios@×××××.com>