Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm working on a simple bash script that ultimately will read the name of a cd/dvd and output that as a header into a document, then read the file contents and output them formatted into the file. My first problem is that I don't know how to get the disk name outputted without Volname (Read Next). My second problem is that I'm using Cygwin for Bash and unfortunately don't have Volname available.
So, I was thinking possibly outputting some LS with a switch that might show the volume name and just GREP'ing it out, but I've had no luck finding any way to get a volume name outputted without Volname.
Any help getting a disk's name outputted without Volname, or even a complete script of how someone else would do this if you had the time, would be great!
Unfortunately, Cygwin has no /Dev, so this method doesn't work with it, but I did try that out and the idea works well in an actual fully functional Bash environment. I don't know if there is any way to get a volume name through this barring switching completely over to Linux on that computer or somehow importing the Volname command over to it.
However, if you prefer to e operating in WinDOHs at this stage
you could give qemu a shot, and emulate a PC running a real Linux
under Windows. Or, of course, go the other way round and install
some Linux, run qemu and have winDOHs tucked away in a virtual
As for cygwin itself; I wouldn't have a clue whether it has the
executable ready for install, or how trivial it would be to try
and port that piece of software.
"Beginning with Cygwin 1.3.4, raw devices are accessible by Cygwin processes using fixed POSIX device names. These fixed POSIX device names are generated using a direct conversion from the POSIX namespace to the internal NT namespace. E.g. the first harddisk is the NT internal device \device\harddisk0\partition0 or the first partition on the third harddisk is \device\harddisk2\partition1. The first floppy in the system is \device\floppy0, the first CD-ROM is \device\cdrom0 and the first tape drive is \device\tape0"
Of course I'd like to emphasise I'd rather see you use the versatile, robust, performant and generally way more efficient GNU/Linux over using the eternally blue-screeing, cut-n-perish, POS (Pitiful Operating System aka the MICROS~1 Game Platform)
Last edited by unSpawn; 06-10-2006 at 09:05 PM.
I do the same thing at work. I installed Cygwin on our video encoder, and have a simple two or three line script that reads the DVD backup's directory and produces a PDF catalog of the videos I've backed up. ( Although each line has a lot of pipes, using sed and enscript, so the line count of the script isn't totally an honest measure.)
I don't read the volume name, but instead enter the name of the disk as an argument to the script. Since I occasionally don't get the disc label right anyway, what I label on the top of the DVD with a marker is what I use as an argument to the script, and is what the catalog shows.