Linux – Remove file without asking


How can I remove a file without asking the user if he agrees to delete the file? I am writing shell script and use rm function, but it asks "remove regular file?" and I really don't need this.

Best Answer

You might have rm aliased to rm -i so try this:

/bin/rm -f file.log

To see your aliases you can run alias.

Related Question