1

I run ubuntu as a dual boot along with Windows and last time I was on ubuntu, I created a folder (Java) in the following directory. This time, when I logged on, I was unable to navigate into the folder, and in nautilus the folder appears with the image of binary.

I don't really mind losing the data that was in the folder, so I'm just trying to delete it so I can make a new one. However, each time I try deleting, moving, or performing any other operation on the 'folder' it gives me a message like in the following:

user@user:/media/user/DATA/Personal/Program$ ls -l
total 788888
drwxrwxrwx 1 root root         0 Aug 17 19:30 Github
-rwxrwxrwx 2 root root    269367 Dec 19 01:30 Java
drwxrwxrwx 1 root root      4096 May 14  2013 Learning
-rwxrwxrwx 2 root root  17929538 Aug 11  2012 mediawiki-1.19.1.tar.gz
-rwxrwxrwx 1 root root      5810 Nov 30 23:55 mtee.zip
drwxrwxrwx 1 root root      4096 Sep 30 23:41 Projects
-rwxrwxrwx 1 root root         0 Dec 19 15:15 Text-1.txt
-rwxrwxrwx 1 root root       782 May 23  2012 ToRuby.lnk
-rwxrwxrwx 2 root root 789884928 Mar 16  2013 ubuntu-12.10-desktop-i386.iso
drwxrwxrwx 1 root root         0 Mar  3  2013 Utility
-rwxrwxrwx 2 root root   5435945 Jul 31 19:20 wordpress-3.5.2.zip
user@user:/media/user/DATA/Personal/Program$ rm Java
rm: cannot remove ‘Java’: No such file or directory
user@user:/media/user/DATA/Personal/Program$ 

Edit: When I try to do any operations on 'Java' in nautilus, I get a "Error removing file: No such file or directory" message as well.

Edit2: I attempted to delete using srm, and received a new error: "Error: File Java - file is hardlinked 1 time(s), skipping!"

Edit 3: I found the second hardlink was in my iTunes library file.

Resolved: I ended up trying to create a new folder in Windows and had absolutely no problems. Rebooted in ubuntu and everything is hunky dory

7
  • Have you tried deleting it as a super user?? sudo rm java
    – Akisame
    Dec 19, 2013 at 20:45
  • 1
    did you type Java or use tab? If the 1st try this sudo rm J{tab} and make it autocomplete. It will pick up any specials chars that way.
    – Rinzwind
    Dec 19, 2013 at 20:48
  • Do you want to delete the folder it is in, or just the Java?
    – Wilf
    Dec 19, 2013 at 20:48
  • I just tried sudo and the tab method and it gave me the same error. Dec 19, 2013 at 20:48
  • 1
    oh its a hardlink!! O good call on srm @wilf Please provide the permissions from all the dirs leading to Java.
    – Rinzwind
    Dec 19, 2013 at 21:09

2 Answers 2

0

Errr... You could always try overwriting it in the Windows installation... smiley

Note - the reason it would not of wanted to delete is the hardlink in the iTunes folder - I would of thought deleting that, and then the main Java file would of worked... Windows probably just ignored all this and deleted it, which might cause a few problems with the one in the iTunes folder...

0

All of the folder it is in owned by root, but you should be able to delete with sudo:

sudo rm -rf /media/user/DATA/Personal/Program/Java

To create a new folder, you can use:

mkdir /media/user/DATA/Personal/Program/Java

if you run into a permissions error, and want it to be owned by your user:

sudo mkdir /media/user/DATA/Personal/Program/Java
sudo chown -R YOUR-USERNAME:YOUR-USERNAME /media/user/DATA/Personal/Program/Java 

and if you want the entire folder owned by your user:

sudo chown -R YOUR-USERNAME:YOUR-USERNAME /media/user/DATA/Personal/Program/

Hope this helps smiley

4
  • user@user:/media/user/DATA/Personal/Program$ sudo rm -rf /media/user/DATA/Personal/Program/Java user@user:/media/user/DATA/Personal/Program$ ls Github Java Learning Projects Utility Dec 19, 2013 at 20:55
  • Unfortunately, it still does nothing Dec 19, 2013 at 20:55
  • Try using shred or srm. With shred you may need to use the -f and -u options, but srm I think uses the same options as the rm -rf... command.
    – Wilf
    Dec 19, 2013 at 20:58
  • Shred gave me the same error as before and srm gave me a new one: see above Dec 19, 2013 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .