Current Position:Home > [SOLVED]Index of files in a directory

[SOLVED]Index of files in a directory

Update:10-11Source: network consolidation
Advertisement
I've tried creating an index of files in, f.e., my movies directory but I can't seem to get it to work properly.  The command I've been using was
find . -iname '*' > ./FILES
which generates the following list:
./Inglourious Basterds.mp4
./Inspector Clouseau.avi
./James Bond A View to a Kill.mp4
./James Bond Casino Royale.mkv
./James Bond Diamonds Are Forever.mp4
./James Bond Die Another Day.mkv
./James Bond Dr. No.mkv
./James Bond For Your Eyes Only.mkv
./James Bond From Russia with Love.mkv
./James Bond Goldfinger.mkv
./James Bond License to Kill.mkv
./Judge Dredd.mkv
./Kick Ass.mkv
./Kill Bill Volume 1.mkv
./Kill Bill Volume 2.mkv
./Mallrats.m2ts
./Man On The Moon.m4v
./Marx Brothers A Night at the Opera.avi
./Marx Brothers A Night in Casablanca.avi
./Marx Brothers Animal Crackers.avi
./Rambo Extended Cut.mkv
./Rambo First 3.mkv
./Rambo First Blood Part 1.mkv
./Rambo First Blood Part 2.mkv
./Ratatouille.mkv
./Red Dawn (1984).mkv
./Repo the Genetic Opera.mkv
./Resevoir Dogs.mp4
./Blazing Saddles 720p.mkv
./Braveheart.mp4
./Bubba Ho-Tep.mkv
./Burn After Reading.mkv
./Caddyshack.mkv
./Chasing Amy.mkv
./Clerks 2.mkv
./Corpse Bride.mkv
./Curse of the Pink Panther.avi
./Despicable Me.avi
./Die Hard 1.mkv
./Die Hard 2 Die Harder.mkv
./Die Hard 3 Die Hard With a Vengence.mkv
./Die Hard 4 Live Free or Die Hard.mkv
./The Mummy Returns.mp4
./The Mummy Tomb of the Dragon Emperor.mp4
./The Mummy.mp4
./The Nightmare Before Christmas.mkv
./The Pink Panther (1963).mp4
./The Pink Panther Strikes Again.mp4
./The Producers.avi
./The Shining.m4v
./The Troll Hunter.mkv
./The.Godfather.III.1990.BluRay.1080p.DTS.x264.dxva-EuReKA.mkv
./2001 a Space Odyssey.mkv
./300.mkv
./A Bug's Life.mkv
./A Clockwork Orange.mkv
./A Shot in the Dark.mp4
./Airplane II The Sequel.avi
./Airplane.mkv
./James Bond Moonraker.mkv
./James Bond Octopussy.mp4
./James Bond On Her Majesty's Secret Service.mp4
./James Bond Quantum of Solace.mkv
./James Bond The Living Daylights.mp4
./James Bond The Man With The Golden Gun.mkv
./James Bond The Spy Who Loved Me.mkv
./James Bond The World Is Not Enough.mkv
./James Bond Thunderball.mkv
./James Bond Tomorrow Never Dies.mkv
./James Bond You Only Live Twice.mp4
./Jay and Silent Bob Strike Back.m2ts
./Alice in Wonderland.mkv
./American Psycho.mkv
./Annie Hall.avi
./Apocalypse Now {1979}.mp4
./Back to the Future 1.mp4
./Back to the Future 2.mp4
./Back to the Future 3.mp4
./Bambi.mkv
./Beauty And The Beast.mkv
./Beetlejuice.mkv
./Beverly Hills Cop 2.avi
./Ferris Bueller's Day Off.mkv
./Fiddler on the Roof.mkv
./Fight Club.mkv
./file-list
./FILES
./Finding Nemo.mkv
./Full Metal Jacket.mkv
./O Brother, Where Art Thou.2000.x264.HDTVRip.(1080p).mkv
./Office Space.m2ts
./One Flew Over the Cuckoo's Nest.mkv
./Pan's Labyrinth.mkv
./Plan 9 From Outer Space.mkv
./Revenge of the Pink Panther.mp4
./Risky Business.mkv
./Robinhood Men in Tights.avi
./Robocop.mkv
./Rocky Horror Picture Show.avi
./Saving Private Ryan.mp4
./Serenity.avi
./Sharktopus.avi
./Shrek 1 (2001).mkv
./Shrek 2 (2004).mkv
./Shrek 3 (2007).mkv
./Shrek 4 (2010).mkv
./Silent Movie.avi
./Son of The Pink Panther.avi
./Spaceballs.avi
./Srpski Film.mkv
./Star Trek (2009).mkv
./Star Wars Episode 1.mkv
./Star Wars Episode 2.mkv
./Star Wars Episode 3.mkv
./Star Wars Episode 4.mkv
./Star Wars Episode 5.mkv
./Starship Troopers.mp4
./Sucker Punch.mkv
./Taken.avi
./Tangled.mkv
./Team America World Police Unrated.mp4
./The Adjustment Bureau.mkv
./The Adventures Of Baron Munchausen.mp4
./The Adventures of Buckaroo Bonzai - Across the Eighth Dimension.avi
./The Big Lebowski.mp4
./The Blues Brothers.mkv
./The Boondock Saints II - All Saints Day.m4v
./The Boondock Saints.mkv
./The Bourne Identity.mkv
./The Bourne Supremacy.mkv
./The Bourne Ultimatum.mkv
./The Breakfast Club.mp4
./The City Of Lost Children - English.avi
./The City of Lost Children - French.mkv
./The Dark Knight.mkv
./The Departed.mkv
./The Expendables.mkv
./The Godfather Part 1.mkv
./The Godfather Part 2.mkv
./The Godfather Part 3.mkv
./The Goonies.avi
./The Incredibles.mkv
./The Karate Kid.mkv
./The Lion King.mkv
./The Living Daylights.avi
./The Lord Of The Rings The Fellowship of the Ring Extended Edition.m2ts
./The Lord Of The Rings The Return of the King Extended Edition.m2ts
./Donnie Darko.mkv
./Dr Strangelove.mp4
./Dr. Horrible's Sing-Along Blog.mkv
./Everything is Illuminated.avi
./Face Off.mp4
./Fantasia (1940).mkv
./Fantasia (2000).mkv
./Ghostbusters 2.mkv
./Ghostbusters.mkv
./Goodfellas.mkv
./Hackers.mkv
./History of The World Part 1.avi
./Inception.mkv
./Indiana Jones And The Kingdom Of The Crystal Skull.m2ts
./Indiana Jones and the Last Crusade.m2ts
./Indiana Jones and the Raiders of the Lost Ark.m2ts
./Indiana Jones and the Temple of Doom.m2ts
./Police Academy.avi
./Police Academy.mkv
./Pulp Fiction.mkv
./Trail of the Pink Panther.mp4
./TRON Legacy.mkv
./TRON.mkv
./Tropic Thunder.mkv
./Up (2009).mkv
./V For Vendetta.mkv
./Wall-E.m2ts
./Watchmen.mkv
./Weird Science.avi
./X-Men 1.mkv
./X-Men 2.mkv
./X-Men 3 The Last Stand.mkv
./X-Men Origins Wolverine.mkv
./Young Frankenstein.avi
./Zombieland.mkv
./Marx Brothers Duck Soup.avi
./Marx Brothers Go West.avi
./Marx Brothers Horse Feathers.avi
./Marx Brothers Monkey Business.avi
./Marx Brothers Room Service.avi
./Marx Brothers The Big STore.avi
./Marx Brothers The Cocoanuts.avi
./Megamind.mkv
./Monsters Inc.mkv
./Monty Python - And Now For Something Completely Different (1971).avi
./Monty Python - Jabberwocky (1977).avi
./Monty Python - Life of Brian (1979).avi
./Monty Python - The Meaning Of Life (1983).avi
./Monty Python and the Holy Grail (1975).avi
./Monty Python Live at the Hollywood Bowl (1982).avi
./Mulan.avi
./Muppet Treasure Island.mp4
./National Treasure Book of Secrets.mkv
./Beverly Hills Cop.mp4
./Big Trouble in Little China.mkv
./Bill And Teds Excellent Adventure.avi
./Blade Runner.mkv
./Aladdin.mkv
./Beverly Hills Cop 3.avi
./Dogma.mkv
./Fear and Loathing in Las Vegas.mkv
./Ghost Rider.mkv
./James Bond Live and Let Die.mkv
./Marx Brothers At The Circus.avi
./National Treasure.mkv
./Planes Trains and Automobiles.avi
./Raising Arizona.avi
./Revenge of the Nerds.avi
./Star Wars Episode 6.mkv
./Team America.avi
./The Lord Of The Rings The Two Towers 2002 Extended Edition.m2ts
./This Is Spinal Tap.avi
./Thumbs.db
./Top Gun.avi
./Topgun.avi
./Toy Story 2.m4v
./Toy Story 3.m2ts
./Toy Story.m4v
./Trading Places.mkv
But when I use
ls -a > ./FILES
it generates the following list:
2001 a Space Odyssey.mkv
300.mkv
A Bug's Life.mkv
A Clockwork Orange.mkv
Airplane II The Sequel.avi
Airplane.mkv
Aladdin.mkv
Alice in Wonderland.mkv
American Psycho.mkv
Annie Hall.avi
Apocalypse Now {1979}.mp4
A Shot in the Dark.mp4
Back to the Future 1.mp4
Back to the Future 2.mp4
Back to the Future 3.mp4
Bambi.mkv
Beauty And The Beast.mkv
Beetlejuice.mkv
Beverly Hills Cop 2.avi
Beverly Hills Cop 3.avi
Beverly Hills Cop.mp4
Big Trouble in Little China.mkv
Bill And Teds Excellent Adventure.avi
Blade Runner.mkv
Blazing Saddles 720p.mkv
Braveheart.mp4
Bubba Ho-Tep.mkv
Burn After Reading.mkv
Caddyshack.mkv
Chasing Amy.mkv
Clerks 2.mkv
Corpse Bride.mkv
Curse of the Pink Panther.avi
Despicable Me.avi
Die Hard 1.mkv
Die Hard 2 Die Harder.mkv
Die Hard 3 Die Hard With a Vengence.mkv
Die Hard 4 Live Free or Die Hard.mkv
Dogma.mkv
Donnie Darko.mkv
Dr. Horrible's Sing-Along Blog.mkv
Dr Strangelove.mp4
Everything is Illuminated.avi
Face Off.mp4
Fantasia (1940).mkv
Fantasia (2000).mkv
Fear and Loathing in Las Vegas.mkv
Ferris Bueller's Day Off.mkv
Fiddler on the Roof.mkv
Fight Club.mkv
FILES
Finding Nemo.mkv
Full Metal Jacket.mkv
Ghostbusters 2.mkv
Ghostbusters.mkv
Ghost Rider.mkv
Goodfellas.mkv
Hackers.mkv
History of The World Part 1.avi
Inception.mkv
Indiana Jones And The Kingdom Of The Crystal Skull.m2ts
Indiana Jones and the Last Crusade.m2ts
Indiana Jones and the Raiders of the Lost Ark.m2ts
Indiana Jones and the Temple of Doom.m2ts
Inglourious Basterds.mp4
Inspector Clouseau.avi
James Bond A View to a Kill.mp4
James Bond Casino Royale.mkv
James Bond Diamonds Are Forever.mp4
James Bond Die Another Day.mkv
James Bond Dr. No.mkv
James Bond For Your Eyes Only.mkv
James Bond From Russia with Love.mkv
James Bond Goldfinger.mkv
James Bond License to Kill.mkv
James Bond Live and Let Die.mkv
James Bond Moonraker.mkv
James Bond Octopussy.mp4
James Bond On Her Majesty's Secret Service.mp4
James Bond Quantum of Solace.mkv
James Bond The Living Daylights.mp4
James Bond The Man With The Golden Gun.mkv
James Bond The Spy Who Loved Me.mkv
James Bond The World Is Not Enough.mkv
James Bond Thunderball.mkv
James Bond Tomorrow Never Dies.mkv
James Bond You Only Live Twice.mp4
Jay and Silent Bob Strike Back.m2ts
Judge Dredd.mkv
Kick Ass.mkv
Kill Bill Volume 1.mkv
Kill Bill Volume 2.mkv
Mallrats.m2ts
Man On The Moon.m4v
Marx Brothers A Night at the Opera.avi
Marx Brothers A Night in Casablanca.avi
Marx Brothers Animal Crackers.avi
Marx Brothers At The Circus.avi
Marx Brothers Duck Soup.avi
Marx Brothers Go West.avi
Marx Brothers Horse Feathers.avi
Marx Brothers Monkey Business.avi
Marx Brothers Room Service.avi
Marx Brothers The Big STore.avi
Marx Brothers The Cocoanuts.avi
Megamind.mkv
Monsters Inc.mkv
Monty Python - And Now For Something Completely Different (1971).avi
Monty Python and the Holy Grail (1975).avi
Monty Python - Jabberwocky (1977).avi
Monty Python - Life of Brian (1979).avi
Monty Python Live at the Hollywood Bowl (1982).avi
Monty Python - The Meaning Of Life (1983).avi
Mulan.avi
Muppet Treasure Island.mp4
National Treasure Book of Secrets.mkv
National Treasure.mkv
O Brother, Where Art Thou.2000.x264.HDTVRip.(1080p).mkv
Office Space.m2ts
One Flew Over the Cuckoo's Nest.mkv
Pan's Labyrinth.mkv
Plan 9 From Outer Space.mkv
Planes Trains and Automobiles.avi
Police Academy.avi
Police Academy.mkv
Pulp Fiction.mkv
Raising Arizona.avi
Rambo Extended Cut.mkv
Rambo First 3.mkv
Rambo First Blood Part 1.mkv
Rambo First Blood Part 2.mkv
Ratatouille.mkv
Red Dawn (1984).mkv
Repo the Genetic Opera.mkv
Resevoir Dogs.mp4
Revenge of the Nerds.avi
Revenge of the Pink Panther.mp4
Risky Business.mkv
Robinhood Men in Tights.avi
Robocop.mkv
Rocky Horror Picture Show.avi
Saving Private Ryan.mp4
Serenity.avi
Sharktopus.avi
Shrek 1 (2001).mkv
Shrek 2 (2004).mkv
Shrek 3 (2007).mkv
Shrek 4 (2010).mkv
Silent Movie.avi
Son of The Pink Panther.avi
Spaceballs.avi
Srpski Film.mkv
Starship Troopers.mp4
Star Trek (2009).mkv
Star Wars Episode 1.mkv
Star Wars Episode 2.mkv
Star Wars Episode 3.mkv
Star Wars Episode 4.mkv
Star Wars Episode 5.mkv
Star Wars Episode 6.mkv
Sucker Punch.mkv
Taken.avi
Tangled.mkv
Team America.avi
Team America World Police Unrated.mp4
The Adjustment Bureau.mkv
The Adventures Of Baron Munchausen.mp4
The Adventures of Buckaroo Bonzai - Across the Eighth Dimension.avi
The Big Lebowski.mp4
The Blues Brothers.mkv
The Boondock Saints II - All Saints Day.m4v
The Boondock Saints.mkv
The Bourne Identity.mkv
The Bourne Supremacy.mkv
The Bourne Ultimatum.mkv
The Breakfast Club.mp4
The City Of Lost Children - English.avi
The City of Lost Children - French.mkv
The Dark Knight.mkv
The Departed.mkv
The Expendables.mkv
The.Godfather.III.1990.BluRay.1080p.DTS.x264.dxva-EuReKA.mkv
The Godfather Part 1.mkv
The Godfather Part 2.mkv
The Godfather Part 3.mkv
The Goonies.avi
The Incredibles.mkv
The Karate Kid.mkv
The Lion King.mkv
The Living Daylights.avi
The Lord Of The Rings The Fellowship of the Ring Extended Edition.m2ts
The Lord Of The Rings The Return of the King Extended Edition.m2ts
The Lord Of The Rings The Two Towers 2002 Extended Edition.m2ts
The Mummy.mp4
The Mummy Returns.mp4
The Mummy Tomb of the Dragon Emperor.mp4
The Nightmare Before Christmas.mkv
The Pink Panther (1963).mp4
The Pink Panther Strikes Again.mp4
The Producers.avi
The Shining.m4v
The Troll Hunter.mkv
This Is Spinal Tap.avi
Thumbs.db
Topgun.avi
Top Gun.avi
Toy Story 2.m4v
Toy Story 3.m2ts
Toy Story.m4v
Trading Places.mkv
Trail of the Pink Panther.mp4
TRON Legacy.mkv
TRON.mkv
Tropic Thunder.mkv
Up (2009).mkv
V For Vendetta.mkv
Wall-E.m2ts
Watchmen.mkv
Weird Science.avi
X-Men 1.mkv
X-Men 2.mkv
X-Men 3 The Last Stand.mkv
X-Men Origins Wolverine.mkv
Young Frankenstein.avi
Zombieland.mkv
If you go over them you'll notice that, using find, some of the entries are out of order but I haven't figured out what the problem is.  If I only wanted to do this for my movies folder that would be fine and I would just use ls -a but I would prefer to do it for my entire external HDD which also has ~11000 songs on it from hundreds of artists so I would hate to do it for each directory.  Is there either some way I can do this easier or some other command (I've been told to look into glob but I can't figure out how to use it) that would do it better?  Note: I get the same result from using
find . -type f > ./FILES
as well.
Last edited by alienated_humour (2011-09-06 20:29:04)

The Best Answer

Advertisement
Army wrote:
Dude, start a local ftp server and give me the link, I want some of those movies
@mods, the smiley is intended to show irony (although, who knows? )
https://wiki.archlinux.org/index.php/Fo … e#Legality - which you already know about. Forum posts are world-readable, and CAN get both you and Arch in trouble, please avoid touching on illegal subjects. What you do outside Arch forums is none of our business, of course.
  • [SOLVED]Index of files in a directory Update:10-11

    I've tried creating an index of files in, f.e., my movies directory but I can't seem to get it to work properly.  The command I've been using was find . -iname '*' > ./FILES which generates the following list: ./Inglourious Basterds.mp4 ./Inspector C

  • [SOLVED]JDownloader: Open File / Open Download Directory not clickable Update:11-30

    I bought a new drive, JD downloads without problems in a folder in this drive, but I can not click on Open File and Open Download Directory. I use Thunar. On my previous installation I had the same problem and solved it by moving the download folder

  • How to get rid of Index of file:///C:/Users/lago/AppData/Roaming/SpecialSavings/ Up to higher level directory Name Size Last Modified File:SpecialSavings_2.0 Update:11-30

    I am unable to uninstall this high risk addon shown below in Firefox Ad Data Index of file:///C:/Users/lago/AppData/Roaming/SpecialSavings/ Up to higher level directory Name Size Last Modified File:SpecialSavings_2.0.0.crx 25 KB 19-Aug-12 6:03:42 PM

  • This is what I get, Index of file:///C:/Program Files/Mozilla Firefox/ Update:11-30

    Index of file:///C:/Program Files/Mozilla Firefox/ Up to higher level directory Name Size Last Modified File:AccessibleMarshal.dll 19 KB 7/8/2011 3:16:28 AM File:D3DCompiler_43.dll 2057 KB 1/1/2010 3:00:00 AM File:README.txt 1 KB 1/1/2010 3:00:00 AM

  • Site edit not recognizing index.htm file Update:10-11

    Going through the Site/Edit function to change server information, DW told me it can't find the index.htm file. Waiting on more information from the host - beside the new IP address, the password has been changed and the upload path. While I'm waitin

  • How to get all files in one directory Update:10-11

    Hi there, is there any way to get all the files in one directory? e.g. a method File[] getAllFiles(String directory){ Thank youJust out of interest, which part of the File API was confusing? http://java.sun.com/j2se/1.5.0/docs/api/index.html If you l

  • How to get the current executing file/itself absolute directory? Update:10-11

    hellooo,           gentlemen/lady, how to get the current executing file/itself absolute directory?           thanks                     Hello,           you can get the real path information of the JSP through the servlet context:           http://j

  • How to get the file size (in bytes) for all files in a directory? Update:10-11

    How to get the file size (in bytes) for all files in a directory? The following code does not work. isFile() does NOT recognize files as files but only as directories. Why? Furthermore the size is not retrieved correctly. How do I have to code it oth

  • Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name Update:10-11

    In our current application we have the following source directory structure:           src -           - com           - edeploy           - subdirs ... (many directories here)           - jsp           -subdirs ... (many directories here)           

  • How to create a file in current directory Update:10-11

    hi, I want to create a file in a current directory, But when i written following code then it cannot create file, How i will create file in current directory? Is there anyone who can help me?what will be the solution of this problem? Please give me s