0

I need to see what files are removed. So I want to redefine rm to rm -v. Could you please help?

3

If your shell is sh, ksh, zsh, or bash then add

 alias rm='rm -v'

to the appropriate shell start up file.

If your shell is csh or tcsh then add

alias rm rm -v

to the appropriate shell start up file.

0

Your default shell will be bash, so add to ~/.profile something like this:

alias rm='rm -v'

  • ~/.profile is for sh. - for bash use ~/.bash_profile (if you have no ~/.bash_profile then ~/.profile will work) – user151019 Jun 20 '18 at 16:17
  • /bin/sh on MacOS is just /bin/bash --posix – tunecrew Jun 20 '18 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .