Zolved community solution Createarticle_iconnew articleEditarticle_iconedit article

How to display prompt before removing/overwriting files/folders on Ubuntu in Console mode

Just follow these simple steps to enable a prompt before overwriting/removing files or folders in Console mode on Ubuntu

  • Go to Applications > Accessories > Terminal to open a terminal window.



  • Enter the following command to make a copy of bash.bashrc file.

    sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup



  • Edit bash.bashrc file by typing the following commad at the terminal.

    gksudo gedit /etc/bash.bashrc


  • Append the following lines at the end of the file and Save the file.

    alias rm='rm -i'

    alias cp='cp -i'

    alias mv='mv -i'



  • Now, a prompt is shown everytime you try to remove or overwrite a file folder.


copyright © 2007, IPTouch, Inc.