[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rm tree proposal, safer alternative to rm -rf
From: |
M P |
Subject: |
rm tree proposal, safer alternative to rm -rf |
Date: |
Tue, 30 Nov 2021 11:02:09 +0100 |
Hello there,
would it be more user friendly alternative to add parameter equivalent to
"tree -d" to rm command ?
It will spill out short directory tree with interactive prompt to confirm
rm command.
default can list only like 10 dirs and some parameter can list everything
rm -rt /home
Removing content of these dirs:
/home
├── firstdir
│ │ ├── tst
│ │ ├── other
│ │ │ ├── sub1
│ │ │ └── sub
│ │ ├── desktop
│ │ │ ├── foo
│ │ │ ├── abc
│ │ │ └── bar
and more ...
Confirm ?
rm -r -t=full /home
Removing content of these dirs:
/home
├── firstdir
│ │ ├── tst
│ │ ├── other
│ │ │ ├── sub1
│ │ │ └── sub
│ │ ├── desktop
│ │ │ ├── foo
│ │ │ ├── abc
│ │ │ └── bar
│ │ └── more
│ └── more
└── more
Confirm ?
I'm not developer - just sysadmin scared of creating rm -rf horror story
myself.
Thank you
Best regards
Martin P.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- rm tree proposal, safer alternative to rm -rf,
M P <=