How Do You Troubleshoot a cp Command in Linux?

Problem scenario
You used "cp -i" like this: cp -i foo bar

The command succeeded but bar does not have the contents of foo. What could be wrong?

If "bar" is the name of a pre-existing directory, a copy of "foo" is in the directory named "bar".

Leave a comment

Your email address will not be published. Required fields are marked *