aszy
Posts: 6
Joined: Thu Nov 19, 2015 3:44 pm

Buster : downgraded 'rm' command , how to upgrade

Wed Nov 06, 2019 4:36 am

Good day all. Started running a Buster install and noticed that the 'rm' command has been , um.... reduced in function. I'd use another word , but you get the idea. Gone is the ability to 'rm -rF' and 'rm -R' to recursively remove the directory as well as contents.
Now , I get it that the intended audience may have a reduced function and could wield the 'rm' command and cause havoc. I get it.
But , I'd like to get a real version of 'rm' installed. I don't see it in the repository , so where and how can I go about it?
Thanks in advance,
Al
Pi 2, Pi 3, Pi 3B+ and soon a Pi 4 - for Amateur Radio.

ejolson
Posts: 4513
Joined: Tue Mar 18, 2014 11:47 am

Re: Buster : downgraded 'rm' command , how to upgrade

Wed Nov 06, 2019 4:41 am

aszy wrote:
Wed Nov 06, 2019 4:36 am
Good day all. Started running a Buster install and noticed that the 'rm' command has been , um.... reduced in function. I'd use another word , but you get the idea. Gone is the ability to 'rm -rF' and 'rm -R' to recursively remove the directory as well as contents.
Now , I get it that the intended audience may have a reduced function and could wield the 'rm' command and cause havoc. I get it.
But , I'd like to get a real version of 'rm' installed. I don't see it in the repository , so where and how can I go about it?
Thanks in advance,
Al
Pi 2, Pi 3, Pi 3B+ and soon a Pi 4 - for Amateur Radio.
I thought rm is the same as always. Has something changed?

RossDv8
Posts: 244
Joined: Thu Jan 21, 2016 12:35 pm

Re: Buster : downgraded 'rm' command , how to upgrade

Wed Nov 06, 2019 5:11 am

My Buster says rm -r and rm -f are still available, so I expect rm -rf should still work. But I have nothing I want to test it on just at the moment.
Possibly try with a lower case f (justin case..)

[email protected]:~ $ rm --help
Usage: rm [OPTION]... [FILE]...
Remove (unlink) the FILE(s).

-f, --force ignore nonexistent files and arguments, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively; less intrusive than -i,
while still giving protection against most mistakes
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i); without WHEN, prompt always
--one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
--no-preserve-root do not treat '/' specially
--preserve-root[=all] do not remove '/' (default);
with 'all', reject any command line argument
on a separate device from its parent
-r, -R, --recursive remove directories and their contents recursively
-d, --dir remove empty directories
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit

By default, rm does not remove directories. Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.

To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:
rm -- -foo

rm ./-foo

Note that if you use rm to remove a file, it might be possible to recover
some of its contents, given sufficient expertise and/or time. For greater
assurance that the contents are truly unrecoverable, consider using shred.

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation at: <https://www.gnu.org/software/coreutils/rm>
or available locally via: info '(coreutils) rm invocation'
[email protected]:~ $
Remember, nobody is listening to you
until you fart ...

Heater
Posts: 14800
Joined: Tue Jul 17, 2012 3:02 pm

Re: Buster : downgraded 'rm' command , how to upgrade

Wed Nov 06, 2019 5:38 am

aszy,

As far as I know "rm -rF..." has never existed.

However "rm -rf ..." does and works as it always did.

Oddly I now notice there is bot a -r and -R option. Which do the same recursive thing.
Memory in C++ is a leaky abstraction .

jahboater
Posts: 5228
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Buster : downgraded 'rm' command , how to upgrade

Wed Nov 06, 2019 8:32 am

Heater wrote:
Wed Nov 06, 2019 5:38 am
Oddly I now notice there is bot a -r and -R option. Which do the same recursive thing.
That's for historical reasons. There were some versions of rm on UNIX that needed -R.

Return to “General discussion”