LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   command line: how find dvd or cd file tree to view content (https://www.linuxquestions.org/questions/slackware-14/command-line-how-find-dvd-or-cd-file-tree-to-view-content-4175441567/)

porphyry5 12-15-2012 11:11 AM

command line: how find dvd or cd file tree to view content
 
If I insert a dvd or cd, using a file manager like Thunar or Dolphin, its content becomes automatically available, but its path begins with what I assume is the volume label, e.g. "SlackDVD" for the Slackware dvd.

But if can only use the command line, and insert a dvd or cd whose volume label is unknown, how do I find it?

tronayne 12-15-2012 11:20 AM

Simplest way? Crack open a terminal and
Code:

mount
That will show you where it's mounted and what the label is; SlackDVD is the label of the distribution disk.

Hope this helps some.

porphyry5 12-15-2012 12:14 PM

Quote:

Originally Posted by tronayne (Post 4849906)
Simplest way? Crack open a terminal and
Code:

mount
That will show you where it's mounted and what the label is; SlackDVD is the label of the distribution disk.

Hope this helps some.

I tried that, mount does not show it. With or without a SlackDVD in the drive this is what mount shows
Code:

~ $ mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /home type ext3 (rw)
/dev/sdb1 on /500gb type fuseblk (rw,allow_other,blksize=4096,default_permissions)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdc1 on /3tb type fuseblk (rw,allow_other,blksize=4096,default_permissions)

/etc/fstab contains
Code:

/dev/sda2        swap            swap        defaults        0  0
/dev/sda3        /                ext4        defaults        1  1
/dev/sda1        /home            ext3        defaults        1  2
/dev/sdb1        /500gb          ntfs-3g    fmask=111,dmask=000 1  0
/dev/sdc1        /3tb            ntfs-3g    fmask=111,dmask=000 1  0
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro,comment=x-gvfs-sh$
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

which is as generated by Slackware 14. There is no /dev/cdrom and /mnt/cdrom is empty, as are /mnt/dvd and relevant possibilities in /media; cdrom0, cdrom1, dvd0, dvd1

TobiSGD 12-15-2012 01:38 PM

What do you mean with
Quote:

But if can only use the command line
?

If it means that you have no GUI running then the GUI tools will obviously not mount it for you, you have to do that yourself, for example
Code:

mount /dev/sr0 /mnt/dvd

porphyry5 12-15-2012 01:48 PM

Many thanks.

ljb643 12-15-2012 01:58 PM

Quote:

Originally Posted by porphyry5 (Post 4849901)
... But if can only use the command line, and insert a dvd or cd whose volume label is unknown, how do I find it?

Assuming the CD is /dev/cdrom0, and it is being mounted by udisks2, try this:
Code:

$ udisksctl info --block-device /dev/cdrom0 | grep MountPoints
You can put this in a script file, or make it a shell alias or function.

porphyry5 12-15-2012 06:02 PM

Quote:

Originally Posted by ljb643 (Post 4850005)
Assuming the CD is /dev/cdrom0, and it is being mounted by udisks2, try this:
Code:

$ udisksctl info --block-device /dev/cdrom0 | grep MountPoints
You can put this in a script file, or make it a shell alias or function.

Thanks for the reference to udisksctl, that looks to be a useful command.

gnashley 12-17-2012 07:31 AM

I'm pretty sure those file managers are handling those using a VFS, meaning they are not mounted at all.


All times are GMT -5. The time now is 04:17 PM.