Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What will this command do on unix:

rm somefile ~/data

I was trying to move somefile to the folder at home/data

share|improve this question

migrated from Jul 28 '09 at 0:06

This question came from our site for professional and enthusiast programmers.

You deleted the file. – Chuck Jul 28 '09 at 0:03
I don't think it will appear any useful answers out of this awful question. – setatakahashi Jul 28 '09 at 0:18

It will delete ./somefile and, if it's a file, ~/data (assuming you have permission to do so on both of them, of course).

The command you wanted was:

mv somefile ~/data

If you don't do regular backups, you're probably hosed.

share|improve this answer

rm means remove...

You wanted mv, which means move

rm somefile ~/data

That command deletes somefile, and also deletes ~/data (data file located in the home directory).

If you wanted to rename/move (the two are the same) somefile to ~/data, the proper command would of been:

mv somefile ~/data
share|improve this answer
Yes, when I do cd ~ I don't see the /data folder anymore! But I do see if it I go to /home/xxxx/users folder. Was it just mirrored or aliased then? How can I get it back? – user3183 Jul 28 '09 at 0:17

I think you meant to use mv:

mv somefile ~/data

rm means remove.

share|improve this answer

You removed somefile completely.

rm means 'remove'.

You need 'mv'

Use 'man rm' and 'man mv' for more information.

share|improve this answer

rm is the remove command. see man rm

share|improve this answer


meder@meder-desktop:~$ rm lol ~/lmfao
rm: cannot remove `/home/meder/lmfao': Is a directory

As previously stated you want 'mv'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.