menuimage

Description

Usage

Example

Options

License

Changelog

Download

Donation

My_Other_Sites

My_Programs

Comments

recover-space v0.5 [21 Apr 2015] by Dominic

Description

This script zeroes all unused space in the filesystem of the specified directory. If this is on a virtual disk you can then close the virtual machine and compact the disk using VMWare instructions to make the disk file smaller.

Don't do this while the system is doing anything else!

A warning prompt is displayed before it starts, and visual feedback is provided during the process.

Unlike similar utility zerofree, recover-space.sh does not require unmounting the filesystem. It runs at similar speed to zerofree, and does not affect the size of the virtual disk image at the time of running (tested for vmdk under Vmware Player).

Under the hood all it does is to write null data to the unused space on the filesystem until it is full and then free it up. Because this filesystem will be momentarily full at the end of this process you are strongly advised not to write to it while this is underway.

If running on btrfs, ensure that compression is not enabled. It will not work with compression active because the null data will be compressed into a minimal space.

Usage

sudo ./recover-space.sh [directory]

Example

sudo ./recover-space.sh /tmp

Options

-h show help and exit
-l show changelog and exit

License

Copyright © 2017 Dominic Raferd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Changelog

0.5 [21 Apr 2015] - add some description about use under btrfs
0.4 [10 Dec 2014] - improved help text, compare with zerofree
0.3 [22 Aug 2014] - better reporting especially during process
0.2 [30 Apr 2013] - add help, changelog, variable directory parameter
0.1 [26 Jul 2012] - first version

Download recover-space.sh

Donation

I have provided this software free gratis and for nothing. If you would like to thank me with a contribution, please let me know and I will send you a link. Thank you!

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run under GNU/Linux from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written and tested on an x86-based Linux server, they should run on a Raspberry Pi, and many can run under Windows using Windows Subsystem for Linux (WSL) or Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Miscellaneous Programs

Comments

This section is closed. If you have a question, please submit it by email, thank you.

No comments yet for '/programs/help/recover-space.sh.php'