Search code examples
linuxoutputfuse

remove a "bad address" error from the standard output on the linux terminal


when attempting to copy a file inside a mounted directory, I got this message printed on my terminal:

cp: writing `file': Bad address

However, the copying operation is successfully executed, but I just want to delete this message (for a presentation purpose). any idea how to remove this warning (or error) ?


Solution

  • You could redirect errors to /dev/null or to a log file, like this :

    cp a b 2>/dev/null
    

    or

    cp a b 2>errors.log