Digital_Skream
asked on
How do I quickly delete a large file on an Ext3 volume?
On a Ubuntu 8.04LTS box, I have some rather large files (100GB and larger) that I need to delete on a daily basis. RM'ing the files take an inordinate amount of time. Like in the minutes range. Is there another method of deleting these large files that wouldn't take so long?
FYI, security isn't an issue in this particular matter, so we don't need to worry with wiping the disk, or anything.
Thanks in advance!
FYI, security isn't an issue in this particular matter, so we don't need to worry with wiping the disk, or anything.
Thanks in advance!
ASKER
That isn't feasible in this case. Logistics prevent such a path.
There's no faster way, sorry. The filesystemhas to update it's on-disk structures, and it has to last - at least under ext3. Consider changing filesystem type.
If You don't need the space immediately freed, You could run the rm (unlink) in the background...
ASKER
Yah, I would need the space freed to create another file via script.
What would be a better filesystem? I like the robustness of ext3, but the only drawback for me is the lengthy delete times required.
What would be a better filesystem? I like the robustness of ext3, but the only drawback for me is the lengthy delete times required.
Using GUI is one way. It will immediate delete it but will go to Trash. Then you can empty trash later.
If you want your server not to be much busy during this deleting process you can use the following command:
ls | grep .| xargs rm
where "." is the name of the file/partial name of files.
If you want your server not to be much busy during this deleting process you can use the following command:
ls | grep .| xargs rm
where "." is the name of the file/partial name of files.
ASKER
If it is in Trash, would the space be available for use? Or would that just be like moving a file from one directory to another?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There's many webpages comparing filesystems performance
http://www.t2-project.org/zine/4/
http://linuxgazette.net/102/piszcz.html
But those tests are rather run on small files...
http://www.t2-project.org/zine/4/
http://linuxgazette.net/102/piszcz.html
But those tests are rather run on small files...
space will not be available while files are in trash.
ASKER
Fastrm sounds very interesting, but I am unable to find the source/binaries/package anywhere for ubuntu.
fastrm will not work for You. It's little faster when deleting large amount of files from single directory or directories tree.
for single large file it has to perform the same operations as regular rm.
fastrm used to be part of "inn" news server package - inn keeps very large number of small files - where fastrm was little faster...
for single large file it has to perform the same operations as regular rm.
fastrm used to be part of "inn" news server package - inn keeps very large number of small files - where fastrm was little faster...
ASKER
Then it sounds to me like I need to research a different filesystem, and that would be my only option.
adding and formating help can be found here:
http://www.ehow.com/how_5068221_format-linux-hard-drives.html