Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Recently, a friend played a prank on my pc and now I have a file sitting on my desktop called 'hardcore_porn_xxx'. The problem is it does not go away by a simple delete. I'm new to linux so any help will be appreciated. Thanks

By the way, could this be related to file permissions or something?

hmm@hmmm~$ ls -l
total 0
-rw-r--r-- 1 root root 0 2012-06-04 21:01 hardcore_porn_xxx
share|improve this question
Hey guys trouble is, while the rm command does delete the file. the file reappears on the desktop after a minute or so. – hmm Jun 4 '12 at 15:59
Damn, that was a good prank :D – Zbunjeni Nov 26 '14 at 21:54
Oh noes, please don't delete that :P – choz Jan 8 at 1:52
up vote 2 down vote accepted

It does not matter what permissions are on that file. You need to have write permissions on the directory that contains the file.

(You can even remove files not owned by you if you have write permission for the directory. A confirmation question will appear and by answering with yes, the file will go away.)

So while impersonating the root user will remove the file, you could do that by your own if you could write to the file's parent directory.

Could you list the permissions + owner for that?

On the reappearing problem:

Please execute sudo crontab -l to see if there are any cron jobs for root, and include the output in your question.

Update 2

Your response was:

found this: * * * * * touch /home/chimp/Desktop/hardcore_porn_xxx

Your output states it is a cron job.

Now please execute sudo crontab -e, pick your editor (e.g. mcedit) and delete the whole line containing touch.... Exit the editor, remove the file with any method and wait. It should not reappear anymore.

share|improve this answer
found this: * * * * * touch /home/chimp/Desktop/hardcore_porn_xxx – hmm Jun 4 '12 at 16:06
@hmm Updated with removal instructions. – lgarzo Jun 4 '12 at 16:09
worked, thank you so much!! – hmm Jun 4 '12 at 16:14
@hmm You're welcome! – lgarzo Jun 4 '12 at 16:15
@hmm kill that friend!! – Ashu Jun 4 '12 at 16:28

It won't delete because its owned by 'root' aka superuser.

Delete the file as superuser, and your problem is solved:

sudo rm -f [file]

replace [file] with the path to the file though.

share|improve this answer
didn't solve it, the file does get deleted but another one of the same name appears in a minute. – hmm Jun 4 '12 at 15:54
Nevermind someone else got it – Thomas Ward Jun 4 '12 at 16:31

The file is owned by root. You have to delete it with root privileges

sudo rm hardcore_porn_xxx
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.