Skip to main content
nightproductions.net domain appears to have been hijacked to redirect to questionable destinations
Source Link

Use a command line tool like rmtrashrmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew and rmtrash is now very old and unmaintained. However on reading the code changes when editing this note I noticed that it changed in 2017 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

alias rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew and rmtrash is now very old and unmaintained. However on reading the code changes when editing this note I noticed that it changed in 2017 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

alias rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew and rmtrash is now very old and unmaintained. However on reading the code changes when editing this note I noticed that it changed in 2017 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

alias rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Why not rmtrash
Source Link
mmmmmm
  • 31.4k
  • 18
  • 96
  • 163

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew and rmtrash is now very old and unmaintained. However on reading the code changes when editing this note I noticed that it changed in 20182017 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

```aliasalias rm='rmtrash'```rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew. However on reading the code changes when editing this note I noticed that it changed in 2018 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

```alias rm='rmtrash'``` 

You can use \rm to call rm directly and ignore the alias

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew and rmtrash is now very old and unmaintained. However on reading the code changes when editing this note I noticed that it changed in 2017 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

alias rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Update due to program chnages and expand on things
Source Link
mmmmmm
  • 31.4k
  • 18
  • 96
  • 163

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script tatthat uses appscript to call the Finder to do therethe delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew. However on reading the code changes when editing this note I noticed that it changed in 2018 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrasrmtrash to say /usr/local/bin/rmtrash the creatthen you can create an alias for bash

alias```alias rm='rmtrash'rm='rmtrash'``` 

You can use \rm\rm to call rm directly and ignore the alias

Use a command line tool like rmtrash or a script tat uses appscript to call the Finder to do there delete.

After installing rmtras to say /usr/local/bin/rmtrash the creat an alias for bash

alias rm='rmtrash' 

You can use \rm to call rm directly and ignore the alias

Use a command line tool like rmtrash (which usually just moves the file(s) to ~/.Trash making sure that the file has a unique name) or a script that uses appscript to call the Finder to do the delete. The latter is slower but adds the ability to use the Put Back option fromn Finder to restore the file easily.

I used trash as it is in in MacPorts and Homebrew. However on reading the code changes when editing this note I noticed that it changed in 2018 from using the Finder by default to move by default (which is not what I wanted and is a major change). So I will look for another tool.

As noted in the comments it is not a good idea to make rm an alias best to remember to use the trash program you installed directly

But if you wanted to you could do

After installing rmtrash to say /usr/local/bin/rmtrash then you can create an alias for bash

```alias rm='rmtrash'``` 

You can use \rm to call rm directly and ignore the alias

Source Link
mmmmmm
  • 31.4k
  • 18
  • 96
  • 163
Loading