Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Use Secure Empty Trash to reclaim hard disk space' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: SOX on Dec 15, '03 05:18:51PM

This is interesting. note the dates on the swap files:
drwx--x--x 10 root wheel 340 10 Dec 20:17 app_profile
-rw------T 1 root wheel 67108864 10 Dec 18:17 swapfile0
-rw------T 1 root wheel 67108864 10 Dec 19:43 swapfile1
-rw------T 1 root wheel 134217728 13 Dec 16:36 swapfile2
-rw------T 1 root wheel 268435456 14 Dec 14:37 swapfile3

I wonder what the heck is going on. Seems like I should be able to kill a 3 day old swap file.



[ Reply to This | # ]
10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: the1truestripes on Dec 16, '03 09:34:17AM
I wonder what the heck is going on. Seems like I should be able to kill a 3 day old swap file.

Depends, have you been running a program for three days? If so it may have "stuff" in there. Even if you havn't it might still be in use. The swap file may have been created three days ago when you were running Word, and then you started Excel two days ago and is put some more stuff in there, then you quit Word, and yesterday you started TextEdit and it used the same swap file, and then you quit Excel, but your three day old swap file still has parts in use by the TextEdit you just started recently...

If it is like any other Unix system I have used though the free space in the swap file will get used for other stuff that needs to swap. Also removing the files won't normally do any harm (a secure delete of them might, but a normal rm or drag to trash and "empty trash" won't) because as others have said Unix doesn't actually delete stuff until the last "reference" to it goes away (it will delete the name from the filesystem, but the contents live on until no process has the file open...and there is some interaction with hard links you probbably don't want to know about).

[ Reply to This | # ]

Later swapfiles have earlier dates?
Authored by: macmath on Dec 16, '03 03:26:24PM

What I find most interesting about the swapfiles in the above post is that later swapfiles have earlier dates. Why is swapfile3 dated before any of the others (unless SOX had successfully deleted swapfile0, swapfile1, swapfile 2 ealier AND the swapfiles which were created thereafter started with swapfile0 again) and why swapfile2 is dated before swapfile0 and swapfile1 (unless that above happened and SOX had successfully deleted the new swapfile0 and swapfile1 again).

SOX, if indeed you did delete these swapfiles without reprocussions, and if the next swapfile created after swapfile0-2 were deleted was called swapfile0, what was the size of the new swapfile0? 64 MB like the original swapfile0 or 512 MB like the swapfile4 would have been had the earlier swapfiles not been deleted.



[ Reply to This | # ]
Later swapfiles have earlier dates?
Authored by: macmath on Dec 16, '03 06:39:08PM

Doh! I guess I can tell from your post that the new swapfile0 and swapfile1 were both 64 MB again! ...but, did you delete successfully those original swapfiles and get them replaced by a new swapfile0 and swapfile1, etc. or what is the explanation of the dates being out of order?



[ Reply to This | # ]
Later swapfiles have earlier dates?
Authored by: johnsawyercjs on Mar 13, '05 03:45:21AM

I'm not sure how you perceive that the swapfiles listed in SOX's post are in reverse chronological order:
10 Dec 18:17 swapfile0
10 Dec 19:43 swapfile1
13 Dec 16:36 swapfile2
14 Dec 14:37 swapfile3

Swapfile0, created first, is shown as being created earlier (10 Dec) than the other swapfiles (with swapfile1 created later the same day), and so on through swapfile3. Last time I looked, Dec 13 and Dec 14 came after Dec 10.



[ Reply to This | # ]