Author Topic: Deleting files and folders from an external hard drive.  (Read 4766 times)

0 Members and 2 Guests are viewing this topic.

Offline sandypiper

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Deleting files and folders from an external hard drive.
« on: September 20, 2011, 07:55:10 am »
Hi,
I recently changed the OS in my computer to Ubuntu 11.04. Before moving to Ubuntu, I took a back up of all the files and folders in an external hard drive (pretty old 1TB). Now, I don't seem to be able to delete the unnecessary files from the external drive. Ubuntu keeps denying the permission to delete the files and folders. I know that I am suppose change the permissions by using chmod in the terminal. But my question is how am iI suppose to use 'chmod' command for the external drive and delete the files?. Please Help.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1433
  • Karma: 10021
  • Gender: Male
    • View Profile
    • Awards
Re: Deleting files and folders from an external hard drive.
« Reply #1 on: September 20, 2011, 10:36:10 am »
Ok, so "how" did you back up all of your files and folders, there are many methods and the answer will depend on what you did?

If you did the obvious, drop to a terminal shell and type;
Code: [Select]
df

Your external hard drive will be the line with "/media/...<long number>". For example;
Code: [Select]
$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md0p1            30962748  12263228  17126556  42% /
none                   4055396       912   4054484   1% /dev
none                   4096828       540   4096288   1% /dev/shm
none                   4096828       488   4096340   1% /var/run
none                   4096828        48   4096780   1% /var/lock
/dev/sdb1               195694     93462     91792  51% /boot
/dev/md125             6189632    143352   5731864   3% /media/91541e96-d87b-4638-9397-2542fc9ed5fc

Change to this folder by typing;
Code: [Select]
cd /media/...<long number>...

Or cd /media/ then hit the tab key a couple of times ..

Type pwd then ls just to make sure you are where you think you are, i.e. the root of your backup files. Then;
Code: [Select]
sudo chown -Rv <you> . 

Where <you> is your login id, then it may prompt you for your password ...

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 478
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Deleting files and folders from an external hard drive.
« Reply #2 on: September 20, 2011, 01:57:55 pm »
If you really want to take ownership of the files, Mad Penguins chown (not chmod as you suggest) method is the way to go...

But if you just want to DELETE the files... you could just start nautilus with elevated permissions:

Code: [Select]
gksudo nautilus

then browse to the files... highlight them... and hit Shift+Delete

Be Aware, Shift+Delete will DELETE the files, not move them to the Rubbish Bin... so be careful.
« Last Edit: September 20, 2011, 02:07:37 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal