LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-16-2008, 03:10 PM   #1
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Rep: Reputation: 30
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.
 
Old 01-16-2008, 04:29 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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?
 
Old 01-17-2008, 01:03 PM   #3
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
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.

Last edited by gymnart; 01-17-2008 at 01:09 PM. Reason: new info
 
Old 01-17-2008, 01:56 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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?
 
Old 01-17-2008, 02:01 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
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.
 
Old 01-17-2008, 02:14 PM   #6
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

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

ls > /home/username/contents.txt
 
Old 01-17-2008, 02:16 PM   #7
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,489

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

Edit: oops... too late!

Last edited by colucix; 01-17-2008 at 02:17 PM.
 
Old 01-17-2008, 03:03 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
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.
 
Old 01-17-2008, 03:37 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Quote:
Originally Posted by trickykid View Post
Oh man, just give him the command for crying out loud..
Awww, wat's missing here is an elephant analogy ;-p
 
Old 01-17-2008, 03:39 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Quote:
Originally Posted by trickykid View Post
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...
 
Old 01-17-2008, 04:17 PM   #11
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by unSpawn View Post
Awww, wat's missing here is an elephant analogy ;-p
I can always edit it..
 
Old 01-17-2008, 04:18 PM   #12
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by acid_kewpie View Post
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.
 
Old 01-17-2008, 04:24 PM   #13
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
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.
 
Old 01-17-2008, 04:28 PM   #14
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Damnit, we should have a sex info in profiles, been referring to him and he and it's been a lady the whole time..
 
Old 01-17-2008, 04:31 PM   #15
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
There's always ctrl-s and ctrl-q to suspend/restart output.
 
  


Reply

Tags
contents, dvd, list


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
listing dhcp and dns contents HitenK Linux - Server 1 08-04-2007 08:12 AM
listing the contents of large tar files szim90 Linux - Software 6 04-06-2007 09:23 AM
apache listing directory contents sneakyimp Linux - Software 1 08-10-2006 12:08 PM
list contents of directory without listing contents baddah Linux - Newbie 2 06-12-2006 04:02 AM
where to find listing of distribution contents? mfeat Fedora 3 09-21-2004 11:13 AM


All times are GMT -5. The time now is 05:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration