Access a DVD via the shell without knowing it's name

I'm trying to write a simple shell script that will access a folder on the current DVD, without knowing the name of the DVD.
I would like to access via /Volumes/DVD, but that doesn't exist. Instead, when a DVD is inserted, it is mounted with it's name (ie: /Volumes/MyDVDMovie).
Is there a simple way of doing this?

I've not seen any particularly elegant answer to this before but the necessary information is out there. First, the CDROM drive on YOUR system will have a particular device name starting with perhaps /dev/disk1 as it is on my system. Using the command df with a known CDROM in your drive will help you know which it is. Everything after /dev/disk? will vary depending on the CDROM contents.
The following script, albeit not elegant will set CDPATH to the volume of the CD. I used a CD with spaces in the name to test as CDROMs and DVDs often have spaces.
#!/bin/bash
CDPATH=`df -h |grep /dev/disk1 |
awk '{
for (i=6 ; i<=NF; i++)
if (i == NF)
printf("%s", $i)
else \
printf("%s ", $i)
}'`
echo The CDROM Volume path is \"$CDPATH\"
Results on my system:
The CDROM Volume path is "/Volumes/Plants vs. Zombies"
Do note that this script is specific to your system (due to the CDROM device path) unless you locate a source to determine which device represents the cdrom.

Similar Messages

  • How we can disable access to BOM via the Display Master Recipe (C203)?

    Hi Gurus,
    How we can disable access to BOM via the Display Master Recipe (C203)?
    Thanks!

    Hi Mae Baraquio  
    Have you tried screen variant to make it as display mode.
    please refer below document for your reference.
    Learning SHD0 with Example
    if you find any query kindly revert back.
    Thanks & Regards
    Sandeep Kumar Praharaj

  • HT204053 hi there. my phone was stolen and i have heaps of notes that i need to access, but i'm not able to access my notes via the cloud, any tips on how to do this? thanks

    hi there. my phone was stolen and i have heaps of notes that i need to access, but i'm not able to access my notes via the cloud, any tips on how to do this? thanks

    i'm not able to access my notes via the cloud
    If your notes sync with your icloud account, you can access them at www.icloud.com

  • Accessing a server via the Server app from outside a router firewall

    So I'm trying to access my server using the Server app on a MacBook Pro outside my server network.  I can access it just fine when my client is inside the server network, but I cannot connect when outside the server network.
    I've done the following troubleshooting:
    - I've turned off the server Firewall option available in the server's Server Admin tool
    - I've set up port forwarding on my router
    - I've opened up port 311 on the router
    - I've placed the server outside the router DMZ zone and the Server app connects just fine
    - I've checked the box "Allow remote administration using Server" in the server's Server app Settings tab
    - With the router configured correctly, the Server app cannot access the server
    There's something in the router that is blocking access by the Server app.  Apple Enterprise support says they are sure there is no other port to open up.  Is there something else I should be doing to access the server from outside the router using a client Server app?
    TIA
    ps - this worked fine when I just had the server hanging directly off a cable modem.

    I and I suspect a lot of other admins would argue you should not be making your server accessible via Server.app remotely due to security concerns. Saying that, I and again I suspect a lot of other admins also want/need to be able to remotely administer servers. There is a better way however to achieve this.
    You should be running a VPN server, perhaps using your same Mac server. You should leave the firewall blocking access directly for Server.app but if your remote Mac first connects via the VPN it will then be connected securely to your internal network and then be able to use Server.app

  • Access Thread Overview via the api

    Is it possible to access the content of System Administration --> Monitoring --> Portal --> Thread Overview via the api?

    Solution found:
    IPortalMonitor portalMonitor =
                   (IPortalMonitor) PortalRuntime.getRuntimeResources().getService(
                        "com.sap.portal.runtime.application.monitor.PortalMonitor");
              IPSMData psmData = portalMonitor.getIPSMDataInstance();
               * Overviewtype 4 are the threads that are running on the server
              psmData.setOverviewType(4);
              psmData.setMaxLines(100);
              ArrayList alATOs = new ArrayList();
              Hashtable htData = portalMonitor.getMonitorData(request, psmData);
              alATOs = psmData.getData(htData, "TO_");

  • Accessing display objects via the stage var

    I'm passing a stage reference to my class, but when I try to
    access a movieclip on the stage I get an error.
    this gives me an error:
    var mc = targetStage.myMovieClip;
    Thanks!

    var myClass = new MyClass (this.stage);
    That would be the same thing, this.stage would refer to the
    Stage instance. Each .swf has one Stage instance. In a Flash
    project, the stage has one child, the MainTimeline instance.
    MainTimeline is basically a big MovieClip, and it contains all your
    objects, scenes and timelines you create in Flash.
    So, if you instantiate from the main timeline itself (either
    on a frame script or Document class) you are already inside
    MainTimeline, which is what you want to pass along a reference to,
    so you would pass in "this" as Colin said, or "root".
    Colin mentioned that MovieClip(root) would work anyway; if I
    understand he is referring to the fact that every DisplayObject
    (such as MovieClips and SimpleButtons created in Flash) already
    have a "root" property that usually refers to the MainTimeline
    instance. However, your class "MyClass" does not extend
    DisplayObject so there is no root property available, which is why
    you need to manually pass in a reference to the root
    timeline.

  • DS 5.2 - how to give users access to suffixes via the admin console?

    I'm in the process of migrating my LDAP install from 5.1 -> 5.2, and have encountered an issue with console access. The "admin" user previously had access to all the suffixes in the directory. After loading the data into a 5.2 directory, this access was lost. The "admin" user can login to the console, but in the directory tab, only sees "cn=schema" and "cn=monitor". The data suffixes are not present. I have verified that the ACI for this user should be allowing access to the data suffixes.
    Any ideas?
    Additionally, I've tried creating new users with console access, and none of them can even login. Thoughts?

    never mind, found it there.

  • My home computer recently went down . it was restored by an expert who put three peoples itunes libraries into one. now I cant sync my ipod touch because it is not paired. I also cant access most of the music without knowing exactly were it came from

    my son , my wife and I all had I-tunes libraries off various i-pod touches and I phones. The computer crashed and the expert lumped all the songs onto one library in the administrator desk top of the refigured computer. Now we cannot access any of the music unless we know how to locate it, which could take forever with 311 albums. Also we cannot get anything to sync as I tunes will not pair because it doesnt recognise any of the devices. Any suggestions gratefully received

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • When I access my music in the cloud without wi-fi does it count against my data

    When I must access my iCloud storage to use my music without wi-fi, will my cellular company charge this against my data allowance?

    You don't have to if you download or sync the music you want to play to your device while your are connected to wifi so it is availale on your device when you aren't connected to wifi.  It will use your data plan if you access it over the cellular data network rather than wifi.  You can disable this by going to Settings>iTunes & App Store and turning Use Cellular Data off at the bottom.

  • HT201250 My MacBook is full.  I want to 'save' (backup) everything on my Time Capsule and then reset my MacBook to factory settings so it is empty again.  Can I access my files on the TC without restoring the whole thing to my MacBook?

    I also bought a WD My Book 2T external hard drive, but I think I wasted my money.  The thing is not easy to navigate.  I bought it because I didn't understand (and still don't really) how the Time Capsule works.  I want to be able to basically 'reformat' my MacBook so it is empty, but have all my current stuff accessable so that if I want to find a photo or file, I don't have to restore the entire thing back onto my MacBook. 

    Then what you want is a Carbon Copy Cloner of your entire OS X boot partition which includes everything (OS X, programs and files) and is hold the option key bootable at boot up (wired or built in keyboard) this way you can boot from it or use Migration or Setup Assistant against it, or access it directly from any computer capable of reading the HFS+ format (Windows PC needs MacDrive installed)
    It's like the ultimate backup system, just blows TimeMachine and TimeCapsule away completely in almost every manner.
    You need another backup anyway in case TC wasn't doing it's job. With the clone you can check it out completely before erasing the original drive too.
    Most commonly used backup methods
    So you need a blank powered external drive formatted Partition: 1 option: GUID and format OS X extended journaled in Disk Utility, use the Erase > Secure >Zero (or middle selection in 10.7+) and allow that work, may take a few hours but it's good for all new drives to be done once.
    Next download CCC and select your boot drive and clone it to the external drive, then when it's finished you hold the option key down (wired or built in keyboard) and while booting up (Startup manager) to select the clone to boot from and check it out.
    Next you need to use Disk Utility (on the clone) and select the Macintosh HD partition of the internal drive and use the Secure Zero Erase (or middle selection) and allow that to work, it will scrub your drive of everything.
    Next you install OS X again.
    How to erase and install Snow Leopard 10.6
    How to reinstall just OS X or erase/install OS X
    Next you install your free iLife and third party programs from original sources
    Restoring your Free iLife (iPhoto, iMovie etc)
    Then you can cherry pick just want you want off the clone drive.

  • I recently inherited a macbook pro when my good friend passed away. the screen is password locked. is there any way around the login without knowing the password???

    How can I get past the password locked login without the password

    The first thing you should do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc, which you can get from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. I suggest you install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. You will need the Apple ID and password that you used to upgrade. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted from the disc, the USB device, or Internet Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive, which is what you should do.
    After partitioning, quit Disk Utility and run the OS X Installer. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    You should then run Software Update and install all available system updates from Apple. If you want to upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it under your ID. In that case, contact iTunes Support.

  • Is there no way to access iPhoto events via the API?

    I'm using the Cocoa API, and near as I can tell, the only way to access event data is to look at the path of photos. This seems really strange, as iPhoto now seems to be centered around events.
    Am I missing something? Is it actually really simple? Is there some backdoor to get that information? What I want is the description, and eventually to be able to edit title & description for events. This is easy for albums...grr.

    Welcome to the Apple Discussions. Why don't you just edit the Event description, name, etc. from within iPhoto like you can Albums? You don't need to go outside of iPhoto to do that.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • I cannot ping the WWW via the shell with SWPS

    hi
    I have installed sun web proxy server, this work fine and i can access with my browser to whatever page but when i do it by example
    -bash-3.00# ping www.google.com
    no answer from www.google.com

    this is my routing table netstat -nr
    Routing Table: IPv4
    Destination Gateway Flags Ref Use Interface
    default 172.24.0.1 UG 1 4265449
    172.24.0.0 172.24.0.3 U 1 2191 vnet0:4
    224.0.0.0 172.24.0.3 U 1 0 vnet0:4
    but if i do traceroute www.google.com i receive this
    traceroute: Warning: www.google.com has multiple addresses; using 209.85.133.99
    traceroute to www.google.com (209.85.133.99), 30 hops max, 40 byte packets
    1 * * *
    2 * * *

  • Accessing TIme Capsule via the Internet

    Hi,
    I would like to set up my TC so that I can access it wherever there is a connection. According to Apple's website I can just register with my MobileMe account. So far I can't seem to find that part, much less is there a step-by-step documentation guide.
    Would appreciate if anyone has successfully done this.
    Thanks!

    According to Apple's website I can just register with my MobileMe account. So far I can't seem to find that part, much less is there a step-by-step documentation guide.
    I suggest starting with Apple's Back to My Mac User's Guide

  • How to address CVE-2012-1675 with Oracle Express 11.2.0.2 release june 2014? No access to patches via the Oracle Critical Patch Update page..

    Where do we find the patch for Express user downloads? The Oracle Critical Patch Update site requires a valid support license.

    XE is not patch-able - there is no support available.

Maybe you are looking for

  • How to change default password in AP521G?

    I´m trying to change the default password in autonomous AP521G, the CCA2.1 sent me errors when I tried to change, or create another user with Privilege 15.

  • Error while opening HFM Application

    Hello all, We have an EPM 11.1.1.3 environment. Components installed are Essbase, Planning, HFM, FR, HSF. Currently we have 2 applications in HFM and we wanted to migrate/upgrade these applications to a EPM 11.1.2.3 environment We have an EPM 11.1.2.

  • [SOLVED] Blank screen after SLiM login

    Hello everyone, I'm very new to Arch as of a few days ago and I have been attempting to set it up in just about all the free time I can spare. I think I've spent about 20 hours total trying to get things up and running. I am attempting to run Arch wi

  • Importing another swf file into the flash-homepage (swf is a gallery)

    hi there! have a problem that i cant resolve myself .. i downloaded a free of use gallery from juliuswebdesign.com (this gallery) and i'm trying to load it in my flash site .. now, the gallery works if i open it directly (i open the swf file) BUT whe

  • APEX 4.2.1 websheets unable to install

    I read the manual, searched the Forum and Googled, but I can't get websheets demo app to install. No matter what I try, I get "The database objects required to create Websheet applications are either invalid or do not exist." I tried: Create Applicat