LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Listing contents of a DVD (https://www.linuxquestions.org/questions/linux-general-1/listing-contents-of-a-dvd-614069/)

gymnart 01-16-2008 03:10 PM

Listing contents of a DVD
 
How do I get a list of the contents of a DVD?
What I want to do is to be able to print this list out to put into a DVD case.
So far, I've tried ls but the list gets cut off about a quarter of the way through, depending on the length of the window.
I've tried du but all I get is 0 and the name of the DVD.

acid_kewpie 01-16-2008 04:29 PM

the length of a window?? what do you mean? ls will list files and directories, not sure what that's not meant to provide... what else do you expect?

gymnart 01-17-2008 01:03 PM

The DVD has some 3,000 files on it from 00 and a to z and the top of the terminal screen after typing the ls command only had the files listed starting from j.

I just wanted a list of all the files.

I just tried it again like this: ls -a /media/Pictures-old but it did not list any of the files that start with numbers and when it got to the file names that start with letters, it only started from B, not A.

acid_kewpie 01-17-2008 01:56 PM

ls *will* list *all* files with that command, simple as that. it will. it's just not possible to accidentally not show files. you could do it deliberately if you really wanted to, but clearly your not. are you not just haivng trouble setting a terminal scroll back long enough?

XavierP 01-17-2008 02:01 PM

You could use the more or less commands with a pipe and then it will stop at the bottom of each screen until you move it on.

jay73 01-17-2008 02:14 PM

Or you could redirect it to a file if you're going to need the output for printing.

ls > /home/username/contents.txt

colucix 01-17-2008 02:16 PM

Or redirect the output to a file and scroll it in your favorite text editor.

Edit: oops... too late! ;)

trickykid 01-17-2008 03:03 PM

Oh man, just give him the command for crying out loud..

ls -a /media/Pictures-old | less

Now you can scroll thru the list of files. Use > to output to a file. Only want to see files starting with A, do:

ls -a /media/Pictures-old/A*

Only want files that start with capitals:

ls -a /media/Pictures-old/[A-Z]*

Do the same for lower case but make the A and Z lowercase.

unSpawn 01-17-2008 03:37 PM

Quote:

Originally Posted by trickykid (Post 3026237)
Oh man, just give him the command for crying out loud..

Awww, wat's missing here is an elephant analogy ;-p

acid_kewpie 01-17-2008 03:39 PM

Quote:

Originally Posted by trickykid (Post 3026237)
Oh man, just give him the command for crying out loud..

ls -a /media/Pictures-old | less

Now you can scroll thru the list of files. Use > to output to a file. Only want to see files starting with A, do:

ls -a /media/Pictures-old/A*

Only want files that start with capitals:

ls -a /media/Pictures-old/[A-Z]*

Do the same for lower case but make the A and Z lowercase.

but he IS using the right command already, just seems to have problems using the valid output...

trickykid 01-17-2008 04:17 PM

Quote:

Originally Posted by unSpawn (Post 3026259)
Awww, wat's missing here is an elephant analogy ;-p

I can always edit it..

trickykid 01-17-2008 04:18 PM

Quote:

Originally Posted by acid_kewpie (Post 3026260)
but he IS using the right command already, just seems to have problems using the valid output...

True but from what I read, the shit is scrolling past him, he just doesn't know how to limit the scrolling, pipe it to a file or command so he can scroll manually, not just letting ti fly by on his screen, terminal, whatever. ;)

gymnart 01-17-2008 04:24 PM

You are right, trickykid. It is scrolling past and I didn't know how to get it to pause.
I will write down the commands and try them out.

Thanks everyone! If I still have trouble, this lady will be back. :D

trickykid 01-17-2008 04:28 PM

Damnit, we should have a sex info in profiles, been referring to him and he and it's been a lady the whole time.. :(

dive 01-17-2008 04:31 PM

There's always ctrl-s and ctrl-q to suspend/restart output.

trickykid 01-17-2008 04:34 PM

Quote:

Originally Posted by dive (Post 3026314)
There's always ctrl-s and ctrl-q to suspend/restart output.

But why do that on file listing? ls | less

Then just use page up or down to scroll. ctrl-s and ctrl-q I could imagine you might skip some lines that scroll by too quickly.. ;)

gymnart 01-18-2008 11:21 AM

lol, trickykid, that's ok, I especially get that due to my nickname.


All times are GMT -5. The time now is 12:58 AM.