Hi,
I have films in directory
with different file extentions (.avi, .mp4 and .mkv) and I would like to generate a list of all these movies in a file. Here is the general structure of the "Films" directory:
The different movies are stored in the "action", "drama", "sci-fi" (and so on) sub-directories. I want my list to be:
To acheive this, I tried this command, which is reported to work in some forums:
which results in the following list in the "films" file:
All other titles don't appear.
What is going on?
I have films in directory
Code:
~/Films
Code:
/Films
/Films/action/
/Film/action/movie1.avi
/Film/action/movie2.avi
/Film/action/movie3.mkv
/Films/drama/
/Film/drama/movie4.avi
/Film/drama/movie5.mkv
/Film/drama/movie6.mp4
/Films/sci-fi/
...
Code:
movie1.avi
movie2.avi
movie3.mkv
movie4.avi
movie5.mkv
movie6.mp4
...
Code:
cd ~/Films
find . -name "*.mp4" -o -name ".avi" -o -name ".mkv" -fprintf films "%f\n"
Code:
movie3.mkv
movie5.mkv
What is going on?
No comments:
Post a Comment