Command 'sfill' not found, but can be installed with:
sudo apt install secure-delete
[The Super User answer 19377](https://superuser.com/a/19377):
```bash
sfill
```
<details>
<summary>Output:</summary>
```
Command 'sfill' not found, but can be installed with:
sudo apt install secure-delete
```
</details>
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
secure-delete
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 74.0 kB of archives.
After this operation, 165 kB of additional disk space will be used.
Get:1 http://mirrors.ircam.fr/pub/ubuntu/archive noble/universe amd64 secure-delete amd64 3.1-8 [74.0 kB]
Fetched 74.0 kB in 0s (623 kB/s)
Selecting previously unselected package secure-delete.
(Reading database ... 962055 files and directories currently installed.)
Preparing to unpack .../secure-delete_3.1-8_amd64.deb ...
Unpacking secure-delete (3.1-8) ...
Setting up secure-delete (3.1-8) ...
Processing triggers for man-db (2.12.0-4build2) ...
sfill
Output:
Warning: you are not root. You might not be able to wipe the whole filesystem.
sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh@thc.org>
Syntax: sfill [-fiIlvz] directory
Options:
-f fast (and insecure mode): no /dev/urandom, no synchronize mode.
-i wipe only inodes in the directory specified
-I just wipe space, not inodes
-l lessens the security (use twice for total insecure mode).
-v is verbose mode.
-z last wipe writes zeros, not random data.
sfill does a secure overwrite of the free space on the partition the specified
directory resides and all free inodes of the directory specified.
Default is secure mode (38 writes).
You can find updates at http://www.thc.org
sudo sfill -v
Output:
sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh@thc.org>
Syntax: sfill [-fiIlvz] directory
Options:
-f fast (and insecure mode): no /dev/urandom, no synchronize mode.
-i wipe only inodes in the directory specified
-I just wipe space, not inodes
-l lessens the security (use twice for total insecure mode).
-v is verbose mode.
-z last wipe writes zeros, not random data.
sfill does a secure overwrite of the free space on the partition the specified
directory resides and all free inodes of the directory specified.
Default is secure mode (38 writes).
You can find updates at http://www.thc.org
```bash
sudo apt install secure-delete -y
```
<details>
<summary>Output:</summary>
```
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
secure-delete
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 74.0 kB of archives.
After this operation, 165 kB of additional disk space will be used.
Get:1 http://mirrors.ircam.fr/pub/ubuntu/archive noble/universe amd64 secure-delete amd64 3.1-8 [74.0 kB]
Fetched 74.0 kB in 0s (623 kB/s)
Selecting previously unselected package secure-delete.
(Reading database ... 962055 files and directories currently installed.)
Preparing to unpack .../secure-delete_3.1-8_amd64.deb ...
Unpacking secure-delete (3.1-8) ...
Setting up secure-delete (3.1-8) ...
Processing triggers for man-db (2.12.0-4build2) ...
```
</details>
```bash
sfill
```
<details>
<summary>Output:</summary>
```
Warning: you are not root. You might not be able to wipe the whole filesystem.
sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh@thc.org>
Syntax: sfill [-fiIlvz] directory
Options:
-f fast (and insecure mode): no /dev/urandom, no synchronize mode.
-i wipe only inodes in the directory specified
-I just wipe space, not inodes
-l lessens the security (use twice for total insecure mode).
-v is verbose mode.
-z last wipe writes zeros, not random data.
sfill does a secure overwrite of the free space on the partition the specified
directory resides and all free inodes of the directory specified.
Default is secure mode (38 writes).
You can find updates at http://www.thc.org
```
</details>
```bash
sudo sfill -v
```
<details>
<summary>Output:</summary>
```
sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh@thc.org>
Syntax: sfill [-fiIlvz] directory
Options:
-f fast (and insecure mode): no /dev/urandom, no synchronize mode.
-i wipe only inodes in the directory specified
-I just wipe space, not inodes
-l lessens the security (use twice for total insecure mode).
-v is verbose mode.
-z last wipe writes zeros, not random data.
sfill does a secure overwrite of the free space on the partition the specified
directory resides and all free inodes of the directory specified.
Default is secure mode (38 writes).
You can find updates at http://www.thc.org
```
</details>
Every 2.0s: ls -lh /oooo... benjamin-loison-framework: Sat Sep 7 21:18:36 2024
-rw------- 1 root root 18G Sep 7 21:18 /oooooooo.ooo
Unclear if when will reach 117G it will be finished or it will only be the first pass.
So it took about 10 minutes for 15 GB.
On my Linux Mint 22 Cinnamon Framework 13:
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vgmint-root 1.8T 1.6T 117G 94% /
```
</details>
```bash
time sudo sfill -v /; echo $?; matrix-commander -m 'sfill finished!'
```
<details>
<summary>Output:</summary>
```
Using /dev/urandom for random input.
Wipe mode is secure (38 special passes)
Wiping now ...
Creating /oooooooo.ooo ...
```
</details>
```bash
ls -lh /oooooooo.ooo
```
```
-rw------- 1 root root 2.7G Sep 7 21:09 /oooooooo.ooo
```
```bash
ls -lh /oooooooo.ooo
```
```
-rw------- 1 root root 2.8G Sep 7 21:09 /oooooooo.ooo
```
```bash
watch ls -lh /oooooooo.ooo
```
<details>
<summary>Output:</summary>
```
Every 2.0s: ls -lh /oooo... benjamin-loison-framework: Sat Sep 7 21:18:36 2024
-rw------- 1 root root 18G Sep 7 21:18 /oooooooo.ooo
```
</details>
Unclear if when will reach 117G it will be finished or it will only be the first pass.
So it took about 10 minutes for 15 GB.
Still same output of time sudo sfill -v /; echo $?; matrix-commander -m 'sfill finished!'.
watch ls -lh /oooooooo.ooo
Output:
Every 2.0s: ls -lh /oooooooo.ooo benjamin-loison-framework: Sat Sep 7 22:20:54 2024
-rw------- 1 root root 137G Sep 7 22:20 /oooooooo.ooo
Note that after a few minutes it was still having more GB. Maybe df -h / is not correct.
So how is it able to get additional GB??
So for avoiding possible data erasure I ctrl + c:
time sudo sfill -v /;echo$?; matrix-commander -m 'sfill finished!'
Output:
Using /dev/urandom for random input.
Wipe mode is secure (38 special passes)
Wiping now ...
Creating /oooooooo.ooo ... ^C
Terminated by signal. Clean exit.
real 73m57.576s
user 0m0.030s
sys 0m0.032s
1
Should test in an environment where I am fine loosing all data.

Still same output of `time sudo sfill -v /; echo $?; matrix-commander -m 'sfill finished!'`.
```bash
watch ls -lh /oooooooo.ooo
```
<details>
<summary>Output:</summary>
```
Every 2.0s: ls -lh /oooooooo.ooo benjamin-loison-framework: Sat Sep 7 22:20:54 2024
-rw------- 1 root root 137G Sep 7 22:20 /oooooooo.ooo
```
</details>
Note that after a few minutes it was still having more GB. Maybe `df -h /` is not correct.
So how is it able to get additional GB??
So for avoiding possible data erasure I <kbd>ctrl</kbd> + <kbd>c</kbd>:
```bash
time sudo sfill -v /; echo $?; matrix-commander -m 'sfill finished!'
```
<details>
<summary>Output:</summary>
```
Using /dev/urandom for random input.
Wipe mode is secure (38 special passes)
Wiping now ...
Creating /oooooooo.ooo ... ^C
Terminated by signal. Clean exit.
real 73m57.576s
user 0m0.030s
sys 0m0.032s
1
```
</details>
Should test in an environment where I am fine loosing all data.
Could backup a Linux virtual machine with lowest space at all (not free) and proceed with it.
Given maximum size, estimating when file writing will be finished would be interesting.
Pegasus for this long running task seems more appropriate.
Could backup a Linux virtual machine with lowest space at all (not free) and proceed with it.
Given maximum size, estimating when file writing will be finished would be interesting.
*Pegasus* for this long running task seems more appropriate.
Using /dev/urandom for random input.
Wipe mode is secure (38 special passes)
Wiping now ...
Creating /oooooooo.ooo ... **^C
Terminated by signal. Clean exit.
ls /oooooooo.ooo
ls: cannot access '/oooooooo.ooo': No such file or directory
df -h /
Output:
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 28G 17G 10G 63% /
-l lessens the security (use twice for total insecure mode).
is unclear what is works on.
Related to [Benjamin_Loison/shred/issues/1#issuecomment-2557852](https://codeberg.org/Benjamin_Loison/shred/issues/1#issuecomment-2557852).
```
-l lessens the security (use twice for total insecure mode).
```
is unclear what is works on.
Tue Dec 31 08:30:27 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (two passes [0xff/random])
Wiping now ...
Creating /oooooooo.ooo ...
not finished.
date && du -sh /oooooooo.ooo
Tue Dec 31 08:32:14 PM CET 2024
798M /oooooooo.ooo
date &&time sudo sfill -vll /
Output:
Tue Dec 31 08:32:28 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (one pass [random])
Wiping now ...
Creating /oooooooo.ooo ...
not finished.
date && du -sh /oooooooo.ooo
Tue Dec 31 08:33:27 PM CET 2024
643M /oooooooo.ooo
So takes about 2 minutes per GB, so 2,000 minutes per TB that is 33 hours.
So default secure mode with 38 passes would take about 33 * 38 = 1,254 hours that is 52 days...
shred makes 3 passes, so would take about 100 hours, that is 4 days, per TB.
df -h /
Output:
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 38G 15G 72% /
time fallocate -l 13G test
Output:
real 0m0.024s
user 0m0.000s
sys 0m0.010s
ls -lh test
-rw-r--r-- 1 benjamin_loison benjamin_loison 13G Dec 31 21:09 test
df -h /
Output:
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 51G 1.7G 97% /
ls -lh /oooooooo.ooo
-rw------- 1 root root 702M Dec 31 21:12 /oooooooo.ooo
Tue Dec 31 09:11:21 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (one pass [random])
Wiping now ...
Creating /oooooooo.ooo ... * Wiping inodes ... Done ... Finished
real 9m39.959s
user 0m0.004s
sys 0m0.014s
ls /oooooooo.ooo
ls: cannot access '/oooooooo.ooo': No such file or directory
```bash
date && time sudo sfill -vl /
```
<details>
<summary>Output:</summary>
```
Tue Dec 31 08:30:27 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (two passes [0xff/random])
Wiping now ...
Creating /oooooooo.ooo ...
```
</details>
not finished.
```bash
date && du -sh /oooooooo.ooo
```
```
Tue Dec 31 08:32:14 PM CET 2024
798M /oooooooo.ooo
```
```bash
date && time sudo sfill -vll /
```
<details>
<summary>Output:</summary>
```
Tue Dec 31 08:32:28 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (one pass [random])
Wiping now ...
Creating /oooooooo.ooo ...
```
</details>
not finished.
```bash
date && du -sh /oooooooo.ooo
```
```
Tue Dec 31 08:33:27 PM CET 2024
643M /oooooooo.ooo
```
So takes about 2 minutes per GB, so 2,000 minutes per TB that is 33 hours.
So default *secure* mode with 38 passes would take about 33 * 38 = 1,254 hours that is 52 days...
`shred` makes 3 passes, so would take about 100 hours, that is 4 days, per TB.
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 38G 15G 72% /
```
</details>
```bash
time fallocate -l 13G test
```
<details>
<summary>Output:</summary>
```
real 0m0.024s
user 0m0.000s
sys 0m0.010s
```
</details>
```bash
ls -lh test
```
```
-rw-r--r-- 1 benjamin_loison benjamin_loison 13G Dec 31 21:09 test
```
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 51G 1.7G 97% /
```
</details>
```bash
ls -lh /oooooooo.ooo
```
```
-rw------- 1 root root 702M Dec 31 21:12 /oooooooo.ooo
```
```bash
sudo file /oooooooo.ooo
```
```
/oooooooo.ooo: data
```
```bash
sudo head -c 10 /oooooooo.ooo
```
```
\ufffd\ufffds-\ufffd\ufffd\ufffd\ufffd
```
```bash
sudo tail -c 10 /oooooooo.ooo
```
```
\f\ufffd`l\ufffd<
```
```bash
sudo od --format=x1 --read-bytes=10 /oooooooo.ooo
```
```
0000000 b4 19 df 73 2d fe ae 9b e8 0e
000001
```
Source: [the Super User answer 706129](https://superuser.com/a/706129)
is not much meaningful to me.
```bash
ls -lh /oooooooo.ooo
```
```
-rw------- 1 root root 2.5G Dec 31 21:16 /oooooooo.ooo
```
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 53G 0 100% /
```
</details>
```bash
ls -l /oooooooo.ooo
```
```
-rw------- 1 root root 2917814272 Dec 31 21:16 /oooooooo.ooo
```
```bash
ls -l /oooooooo.ooo
```
```
-rw------- 1 root root 3204001792 Dec 31 21:17 /oooooooo.ooo
```
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 55G 54G 0 100% /
```
</details>
```bash
df -h
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 392M 1.5M 390M 1% /run
/dev/vda1 55G 54G 0 100% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
/host_share 731G 580G 115G 84% /mnt/host_share
tmpfs 392M 96K 392M 1% /run/user/1000
/dev/sr0 3.3G 3.3G 0 100% /media/benjamin_loison/d-live 12.5.0 gn amd64
```
</details>
DuckDuckGo and Google search `"sfill" while "df" shows 0`.
[The Ask Ubuntu question 961558](https://askubuntu.com/q/961558) is focused on getting progress.
```bash
date && time sudo sfill -vll /
```
<details>
<summary>Output:</summary>
```
Tue Dec 31 09:11:21 PM CET 2024
Using /dev/urandom for random input.
Wipe mode is insecure (one pass [random])
Wiping now ...
Creating /oooooooo.ooo ... * Wiping inodes ... Done ... Finished
real 9m39.959s
user 0m0.004s
sys 0m0.014s
```
</details>
```bash
ls /oooooooo.ooo
```
```
ls: cannot access '/oooooooo.ooo': No such file or directory
```
sfill is designed to delete data which lies on available diskspace on
mediums in a secure manner
...
afterwards as many temporary files as possible are generated to wipe
the free inode space. After no more temporary files can be created,
they are removed and sfill is finished.
Does it take into account blocks only accessible by root (it is defined per partition if I remember correctly)? Maybe as need sudo to use /.
```bash
man sfill
```
<details>
<summary>Output:</summary>
```
sfill is designed to delete data which lies on available diskspace on
mediums in a secure manner
...
afterwards as many temporary files as possible are generated to wipe
the free inode space. After no more temporary files can be created,
they are removed and sfill is finished.
```
</details>
Does it take into account blocks only accessible by `root` (it is defined per partition if I remember correctly)? Maybe as need `sudo` to use `/`.
Can create files when df -h / claims not having space anymore? It would be nice if could during the process to still be able to have manual low activity in parallel. In theory if only read from disk and use RAM it is fine.
on the Linux Mint 22 Cinnamon owned by the person:
Related to [Benjamin_Loison/bash/issues/14](https://codeberg.org/Benjamin_Loison/bash/issues/14).
Can create files when `df -h /` claims not having space anymore? It would be nice if could during the process to still be able to have manual low activity in parallel. In theory if only read from disk and use RAM it is fine.

<details>
<summary>on the Linux Mint 22 Cinnamon owned by the person:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAs2NQJyw+1lJ312HxFheLwPhZWGKICvMr0FJCNtEsWXgw
4wbFEpBUNRyw0qZSi9OCTw7vhfwrVlwdLjZTJFSYGVrUsBgfs5vQxg8TRI9YLF+X
1EoBCQIQBV4rYbaOKeAP+qvBz9Gn4xGll1Epn1TOvcTfJkDzjv1st/mdUEWM+0Vm
NR/mnCDBI+iMH+aLyww+9C5War9NuJzZqamgzA==
=9Ff6
-----END PGP MESSAGE-----
```
</details>
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 879G 492G 388G 56% /
After:
df -h /
Output:
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 879G 483G 396G 55% /
How this process have freed 11 GB according to df -h /?
So it took about 12 hours to erase 388 GB, so it erases about 32 GB per hour. So it needs about 31 hours to erase 1 TB.
Before:
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 879G 492G 388G 56% /
```
</details>
After:
```bash
df -h /
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 879G 483G 396G 55% /
```
</details>
How this process have freed 11 GB according to `df -h /`?

So it took about 12 hours to erase 388 GB, so it erases about 32 GB per hour. So it needs about 31 hours to erase 1 TB.
Maybe with sfill can precise /folder/ as / if need to shred now deleted files that were in /folder/.
However, then have to keep in mind that notably:
- `/tmp/` should investigate that, see [issues/58#issuecomment-3106](https://gitea.lemnoslife.com/Benjamin_Loison/linux/issues/58#issuecomment-3106)
- `/root/`
- `/var/www/html/`
- `/file.swap`
- `/var/spool/cron/crontabs/`
are still in plaintext. As well as temporary operations like zipping?
Related to [Benjamin_Loison/ecryptfs/issues/3](https://codeberg.org/Benjamin_Loison/ecryptfs/issues/3).
I verified quickly the contents of:
- `/root/`
- `/var/www/html/`
- `crontab -l`
on the given person laptop.
Maybe with `sfill` can precise `/folder/` as `/` if need to shred now deleted files that were in `/folder/`.
which have some computer skills, one pass of random if I understood correctly still leaves words but not sentences.
<details>
<summary>According to the person:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAKWSBvVv7KfDUnNntOu/qseQXOZZwBhSmTMAZLlfe+3gw
4bZDLYZbOl1OqTGR3RPkv9K6mfS2TnQWv1oAyEPUTRy/cP1Y9TCFflGKH4kO4Ta8
0kcBkvBNR4DFRdy4bEX2BvU7YT9mpI6axJYZrRpVJgd/QeJgCdFq3dv2cV0u1s1P
6CYui4yBiGtQlWHT5t338JA9p6z+h8ByRw==
=9yWX
-----END PGP MESSAGE-----
```
</details>
which have some computer skills, one pass of random if I understood correctly still leaves words but not sentences.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Tracked at Benjamin_Loison/shred/issues/5.
Related to the issue:
Related to Benjamin-Loison/vim/issues/14.
The Super User answer 19377:
Output:
Output:
Output:
Output:
Related to Benjamin_Loison/coreutils/issues/1.
On my Linux Mint 22 Cinnamon Framework 13:
Output:
Output:
Output:
Unclear if when will reach 117G it will be finished or it will only be the first pass.
So it took about 10 minutes for 15 GB.
Still same output of
time sudo sfill -v /; echo $?; matrix-commander -m 'sfill finished!'.Output:
Note that after a few minutes it was still having more GB. Maybe
df -h /is not correct.So how is it able to get additional GB??
So for avoiding possible data erasure I ctrl + c:
Output:
Should test in an environment where I am fine loosing all data.
Could backup a Linux virtual machine with lowest space at all (not free) and proceed with it.
Given maximum size, estimating when file writing will be finished would be interesting.
Pegasus for this long running task seems more appropriate.
does not return anything.
Output:
Output:
Related to Benjamin_Loison/pv/issues/2.
Output:
Output:
*seems to have been added. Maybe it's the first pass, hence is very slow.Output:
so it seems to be a
*for each pass.Output:
Output:
Cannot use encryption to make it faster? Maybe not retrospectively.
Would help Benjamin_Loison/ecryptfs/issues/2.
Related to Benjamin_Loison/shred/issues/12.
Related to Benjamin_Loison/shred/issues/1#issuecomment-2557852.
is unclear what is works on.
Should test getting file back with testdisk.
Output:
not finished.
Output:
not finished.
So takes about 2 minutes per GB, so 2,000 minutes per TB that is 33 hours.
So default secure mode with 38 passes would take about 33 * 38 = 1,254 hours that is 52 days...
shredmakes 3 passes, so would take about 100 hours, that is 4 days, per TB.Output:
Output:
Output:
Source: the Super User answer 706129
is not much meaningful to me.
Output:
Output:
Output:
DuckDuckGo and Google search
"sfill" while "df" shows 0.The Ask Ubuntu question 961558 is focused on getting progress.
Output:
Related to Benjamin-Loison/cinnamon/issues/179.
Related to Benjamin-Loison/cinnamon/issues/180.
Output:
Does it take into account blocks only accessible by
root(it is defined per partition if I remember correctly)? Maybe as needsudoto use/.Related to Benjamin-Loison/cinnamon/issues/137.
Related to Benjamin_Loison/bash/issues/14.
Can create files when
df -h /claims not having space anymore? It would be nice if could during the process to still be able to have manual low activity in parallel. In theory if only read from disk and use RAM it is fine.on the Linux Mint 22 Cinnamon owned by the person:
Before:
Output:
After:
Output:
How this process have freed 11 GB according to
df -h /?So it took about 12 hours to erase 388 GB, so it erases about 32 GB per hour. So it needs about 31 hours to erase 1 TB.
Firefox YouTube and KeePassXC unlock work fine after reboot.
However, then have to keep in mind that notably:
/tmp/should investigate that, see issues/58#issuecomment-3106/root//var/www/html//file.swap/var/spool/cron/crontabs/are still in plaintext. As well as temporary operations like zipping?
Related to Benjamin_Loison/ecryptfs/issues/3.
I verified quickly the contents of:
/root//var/www/html/crontab -lon the given person laptop.
Maybe with
sfillcan precise/folder/as/if need to shred now deleted files that were in/folder/.According to the person:
which have some computer skills, one pass of random if I understood correctly still leaves words but not sentences.
Related to Benjamin_Loison/Debian/issues/185.