-
kl522, I have been studying that specific script a little bit back and as you predicted, I don't understand it
. I'm used to object oriënted java but I should consider learning bash xd.
What I wanted to do was check for every file in the ramdisk if a process was using it and if not copy it to the knoppix-data, remove from ramdisk and sync.
This should happen when the ramdisk is over 100 mb ever 2 minutes a check.
That link you posted is indeed a way more elegant solution and I'm going to aply it too
-
Senior Member
registered user

Originally Posted by
dinosoep
What I wanted to do was check for every file in the ramdisk if a process was using it and if not copy it to the knoppix-data, remove from ramdisk and sync.
This should happen when the ramdisk is over 100 mb ever 2 minutes a check.
You can use 'lsof' to do it and probably that's the same scheme which is used by Puppy.
But you have to know that it is still not 100% safe. Because a file system allows concurrent access, at one moment your check says the file is not opened, but as soon as you start the copying and deleting the copy on the ramdisk, another process starts opening it for modification or deletion. You can imagine it will result in various confusion to your file system.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Intel Core i5/i7/i9 AMC CPU Processors, LOT of 90 pcs
$18000.00

INTEL CORE I7-870 SLBJG 2.93GHZ LGA1156 4 CORE CPU PROCESSOR
$23.00

INTEL CORE I9-10940X X-SERIES PROCESSOR | 3.30GHZ | SRGSH
$179.99

Intel Core i9-9900K SRG19 3.60GHz 16MB 8-Core LGA1151 B Grade CPU Processor
$175.00

Intel Core i7-3770K 3.5 GHz Processor
$39.00

AMD Ryzen 5 5500 Processor ( read Description)
$59.00

Intel Core i5-12500T SRL5W 2GHz 18MB 6 Core Socket LGA1700 Desktop CPU Processor
$114.99

Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor
$67.99

Intel Core i7-14700KF 20-Core 3.4GHz LGA1700 33MB Cache CPU SRN3Y
$310.00

Intel Core Ultra 7 265K 3.9GHz LGA 1851 Processor
$249.99