0

I entered the following command sudo nautilus /home/ in terminal and copied a 2GB movie to the /home/ directory. So, my home folder contains two folder :

  1. User directory (/home/User)
  2. Movie directory (/home/Movie)

Movie folder contains a 2GB file (/home/Movie/Movie.mp4). Then exited from the root mode (by closing the terminal).Now the free space in home folder shows 55GB.

After two days, I again entered the command sudo nautilus /home/ and became root. Then went to /home/Movie/ directory and deleted the file by just pressing deleted button( not Shift+ Delete).

Then i left again from root mode by closing the teminal. Then checked the free space available and it showed 55GB. Aagain I became the root as said above and went to /home/Movie/ folder. The directory was blank.

So, clicked Trash button from the left pane of the folder. It showed a message box :

The folder content could not be displayed. Sorry, Could not dispaly all the contents of "trash": Operation not supported

. I use Ubuntu 12.04. Can any one help me to permanently delete the file and make free space of 57GB ? Thanks in advance.

1 Answer 1

2

You should never run a graphical application (such as nautilus) with sudo. You should use gksu instead if you need to do this.

Unfortunately, using a graphical application as sudo creates a lot of problems which you are discovering can be difficult to clean up.

The technical explanation behind this is that the program you are executing will be executed as root, but it will think its home directory is your home directory. So if it writes any files to what it thinks is its home directory, you're gonna end up with root-owned files in your home directory.

You have possibly ended up with root-owned files in your user's Trash folder.

You will probably have to clean this up with terminal access, becoming root with sudo -i, and then going into your trash folder (/home/user/.local/share/Trash/files or similar) and manually deleting what you need to delete.

In the future if you need to run nautilus (or any other graphical program) as root, use gksu. This will ensure that it won't mess up your home directory with root-owned files.

Note: There is no reason you would need to copy regular user files to your home directory as root that I can think of - presumably you were trying to work around some other problem by doing this?

Note 2: As a result of running sudo nautilus you may also have other root-owned files within your home directory, such as if nautilus writes its configuration to files in ~/.config/ or similar. This may cause other breakages when you try to run other software.

1
  • You were right! I was trying to delete the old profile file which was from previous Ubuntu install (User.bak directory).
    – 001neeraj
    Nov 21, 2014 at 5:49

You must log in to answer this question.

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