Bash script - TurboDelete...

Forum rules
Before you post please read how to get help
Post Reply
User avatar
invex
Level 2
Level 2
Posts: 78
Joined: Sun Aug 14, 2016 12:38 pm

Bash script - TurboDelete...

Post by invex » Thu Sep 27, 2018 2:42 pm

I published turbodelete script on Github https://github.com/invexx/turbodelete which quickly deletes huge directories using rsync.

I'd like to know if there is an even faster method.

TIA
Attachments
ss.png

gm10
Level 12
Level 12
Posts: 4130
Joined: Thu Jun 21, 2018 5:11 pm

Re: Bash script - TurboDelete...

Post by gm10 » Thu Sep 27, 2018 4:27 pm

No, rsync is probably the fastest way, or at least it's what I use, too. But your implementation is way complicated. I have this in my .bashrc:

Code: Select all

deldir() {
  sudo rsync -rd /dev/null "$1" 1>/dev/null
  sudo rm -rf "$1" 1>/dev/null
}

User avatar
invex
Level 2
Level 2
Posts: 78
Joined: Sun Aug 14, 2016 12:38 pm

Re: Bash script - TurboDelete...

Post by invex » Thu Sep 27, 2018 8:35 pm

gm10 wrote:
Thu Sep 27, 2018 4:27 pm
No, rsync is probably the fastest way, or at least it's what I use, too. But your implementation is way complicated. I have this in my .bashrc:

Code: Select all

deldir() {
  sudo rsync -rd /dev/null "$1" 1>/dev/null
  sudo rm -rf "$1" 1>/dev/null
}
Thanks for the tip.

Post Reply

Return to “Scripts & Bash”