[SOLVED] Need to remove old drive names

When I installed new HD’s, they were given names, I have now reformatted them and changed their names, as well as adding a new one.
I noticed that the names are still there, how can I get rid of them and update the sharing of them?

When you say

I noticed that the names are still there

Where are you “seeing” their names listed ?

What is the contents of:

gedit /etc/fstab

and the output from:

mount

and

ls -a /media

[spoiler]# /etc/fstab: static file system information.

Use ‘blkid’ to print the universally unique identifier for a

device; this may be used with UUID= as a more robust way to name devices

that works even if disks are added and removed. See fstab(5).

proc /proc proc nodev,noexec,nosuid 0 0

/ was on /dev/sda1 during installation

UUID=959cb526-06f8-4d5d-bec2-a6b42f438b07 / ext4 errors=remount-ro 0 1

swap was on /dev/sda5 during installation

UUID=e56dad6b-358f-4948-b51f-4abce81f50b1 none swap sw 0 0

#edited
#/dev/sdb1 /media/Win-Storage ntfs-3g defaults,user,locale=en_GB.utf8 0 0
#/dev/sdc1 /media/Win-MyDocs ext4 rw,user,exec 0 0
#/dev/sdd1 /media/Win-Video ntfs-3g defaults,user,locale=en_GB.utf8 0 0

#original
#/dev/sdb1 /media/Win-Storage ntfs-3g defaults,user,locale=en_GB.utf8 0 0
#/dev/sdc1 /media/Win-MyDocs ext4 rw,user,exec 0 0
#/dev/sdd1 /media/Win-Video ntfs-3g defaults,user,locale=en_GB.utf8 0 0

new attempt

just need to re-install the 1Tb HD

#/dev/sdc /media/Win-Storage ntfs-3g defaults,user,locale=en_GB.utf8 0 0

/dev/sdb1 /media/Win-MyDocs ext4 rw,user,exec 0 0
/dev/sdc1 /media/Drive3 ext4 rw,user,exec 0 0
/dev/sdd1 /media/Drive4 ext4 rw,user,exec 0 0[/spoiler]

and the output from:
mount

peter@Petes-ubuntu-pc:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sdb1 on /media/Win-MyDocs type ext4 (rw,nosuid,nodev,commit=0)
/dev/sdc1 on /media/Drive3 type ext4 (rw,nosuid,nodev,commit=0)
/dev/sdd1 on /media/Drive4 type ext4 (rw,nosuid,nodev,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/peter/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=peter)
/dev/sr0 on /media/AMERICAN_GANGSTER type udf (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500,uhelper=udisks)
peter@Petes-ubuntu-pc:~$

and
ls -a /media

peter@Petes-ubuntu-pc:~$ ls -a /media
. … AMERICAN_GANGSTER Drive3 Drive4 .hal-mtab-lock Win-MyDocs WIn-MyDocs Win-Storage Win-Video
peter@Petes-ubuntu-pc:~$

The last 3 are gone, they are either renamed or reformatted and renamed or gone altogether, the green Win-MyDocs must have appeared when I was trying to sort things out?
what used to be ‘Win-Video’ formatted to NTFS is now ‘Drive3’ reformatted to ext4
‘Drive4’ is the new 2Tb HD formatted to ext4
One of the, I just noticed it’s labelled ‘WIn-MyDocs’ I must have accidentally kept CAPS on, I was trying to sort out the drive names. I

If you’re saying you just want to get rid of those 3 directories, as they are no longer being used as mount points (only guessing as you didn’t answer my first question).

Just recursively delete the directories:

sudo rm -r /media/WIn-MyDocs
sudo rm -r /media/Win-Storage
sudo rm -r /media/Win-Video

Sorry I missed your question.
I have been looking for the/a command to show me the info I saw before, it’s;
peter@Petes-ubuntu-pc:~$ ls -l /media
total 26
dr-x------ 4 peter peter 136 2009-06-07 23:51 AMERICAN_GANGSTER
drwx------ 9 peter peter 4096 2012-04-18 19:06 Drive3
drwx------ 5 peter peter 4096 2012-04-15 22:12 Drive4
drwxrwxrwx 10 peter peter 4096 2012-04-17 23:23 Win-MyDocs ← What’s with all the ‘rwx’, not seen that before?
drwxr-xr-x 2 root root 4096 2011-11-13 17:59 WIn-MyDocs <–same
drwxr-xr-x 2 root root 4096 2011-11-09 09:03 Win-Storage ← same
drwxr-xr-x 2 root root 4096 2011-11-09 09:04 Win-Video <–same (well, could you explain what they all mean please)
peter@Petes-ubuntu-pc:~$

And yes, I want rid of them, what about the problem of the identical ‘WinMyDocs’ but for the CAP ‘I’ which is a new one I created but I have not done anything to the HD as it was already formatted to ‘ext4’ which is what I wanted, will getting rid of ‘WIn-MyDocs’ stop me from accessing the ‘Win-MyDocs’? I’m only asking as I’m not sure what I did to create the near duplicate.

You should be able to remove all the folders from the /media which are no longer needed:

These you must keep as they are mounted by your fstab

/dev/sdb1 /media/Win-MyDocs ext4 rw,user,exec 0 0 /dev/sdc1 /media/Drive3 ext4 rw,user,exec 0 0 /dev/sdd1 /media/Drive4 ext4 rw,user,exec 0 0
will getting rid of 'WIn-MyDocs' stop me from accessing the 'Win-MyDocs'?

NO it won’t :slight_smile:

Unlike Windows, Linux commands and file/directory names ARE case sensitive … so in Linux those 2 are completely different directories.

Just run the 3 commands I gave you, and they will be gone.

Alternatively … start Nautilus with root permissions, and delete them through the GUI:

gksudo nautilus /media

Thanks Mark, all sorted now.
;D