Debian :: Generate Directory List With Exclusions?
Aug 18, 2011
I'm trying to generate a list of my music directory folder structure WITHOUT the files included. I have my music directory set up in a hierarchy of Artist>Album>Files, and I just want to generate a list of the folders because that will, in effect, output a list of what albums I have by what artists, which is ultimately what I'm after. I did some looking on the internet through various forums over the past few days and found two ideas that looked promising, but ended up being not exactly what I needed. The first was to generate a .txt file based off of a shell ls command:
ls -R [music directory name] >> ~/mymusiclist.txt
That's great, except that it also includes the 40,000+ individual music files by name. I'm not about to invest that much time editing the files out of the list when I know there has to be an easier way.The second idea I came upon involved using the extglob function. I tried enabling extglob and using it to input a "negative wildcard" into the above method to remove anything .mp3 from the returned list, but extglob didn't play well in that context. I'm not a command line wizard, so it's entirely possible that I'm missing something fairly obvious. In fact, I'm sure I am. So this is a great opportunity for me to learn something new. If anybody knows of a command line way to do this, I'd love to know it. Or, even better, if anybody knows of an app that can do this, even better. I'm not above installing a secondary music player just to import the library once and get my list.
I have a cron job that backs up some files over to an external disk.It ignores the hidden folders in my home dir, by using the --exclude-from option.However, there is one specific hidden dir that I do want to back up.Is there some way to add an exception to the list of exclusions?
if there is an application available to generate a list with files and folders from a location, like a hard drive or a folder? The list could be in any format, even a text file would be just fine.
List of 77 lines with the names of movies. For ease, let's say it's in a text file. What I want is a command line argument I can pass that'll read each line and pick one of those 77 lines at random, except I can't figure out how to do this. Is there a program I can just pipe the output of 'cat listofmovies.txt' to?
My problem is that I am unable to do a routine upgrade of packages. When I try to perform an upgrade, the following occurs:
Code:
$ sudo aptitude dist-upgrade Reading package lists... Done Building dependency tree
[code]....
If I try to install another package, I get the following message:
Code:
E: I wasn't able to locate file for the tzdata-java package. This might mean you need to manually fix this package. E: I wasn't able to locate file for the tzdata-java package. This might mean you need to manually fix this package. E: Internal error: couldn't generate list of packages to download
I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.
We used VoilaSVN for SVN search. Some time ago it stopped working for an unknown reason. I was searching for a solution, but the voila project seems to be dead, the web pages are not available. I assume the problem is in indexing. Does anybody know how to generate the index directory?
There's a podcast on the internet I love, and I would like to have them all in the same playlist. This podcast doesn't put their episodes in a playlist. Are there any software or scripts I can use for this to work so I can simply just type in the http://url/directory, and have all the mp3 files in a playlist. Or if the playlist part isn't possible, then at least a text documents with all the links?
I am using RedHat MRG on a standalone intel PC that has 8 cpus. It has 2 Quad cores. I am trying to force some specific persistent tuning on it so that the OS and IRQs are all on one CPU socket and then I can run my Application on the other CPU socket (4 CPUs) using the taskset command.
I have been reading up on this mainly at [url] and having some success. But, I have one IRQ that is not active until my application runs that I want to force it to be on CPU 4.
And so I believe I can do this by setting /proc/irq/default_smp_affinity to 10. But, I do not have such a file on my system. How can I create this file at boot time properly?
When I run "ls -al somedir*" (I use the "ll" shortcut, actually), Linux not only list files that match, but also the contents of directories whose name also happens to match.Is there a way to limit "ls" so that it will only show names (files and directories) and ignore the contents of the directories?
As I'm gonna transfer large amount of data folders from one hard drive to another, I wanna make sure that the transfer has not corrupted the data. how could I generate MD5SUMs of entire directory including sub directories, in a single file and later, how could I verify with the data I've just transferred.
I have uShare 1.1a setup to talk to my XBox 360. If I share a directory that has no subdirectories, the video files display on the XBox. However, most of my files are in sub-directories on a different partition - I don't really want to copy them to the share, but uShare doesn't seem to recognise any sub-directories or files contained therein.
I have tried setting up symbolic soft links directly to the video files (although this is a pain, it is better than moving the files)...
Code: ln -s /home/jonftp/TV-Shows/Buffy/Season-1/Buffy-101.avi /home/share/Buffy-101.avi ...but these don't show up on the XBox either.
How can I get uShare to "drill down" the directory structure to list the files or how can I get uShare to follow symbolic links?
I'm looking for suggestions for a command line utility than can generate a contact sheet (e.g. jpg etc) from a video? I'm mainly interested in starting from FLV files, but i guess the solution will probably work for other formats with appropriate codecs etc. So, for example, if i have a 30 minute video, every 2 minutes through it i'd like it to generate a thumbnail and then put 15 of these in a 5 x 3 grid in a single jpg. On Windows,Media Player Classic Homecinem will do this through its ave Thumbnails command.
Ideally i'd like to do this from the command line/script in a debian server environment, rather than a desktop GUI. It doesn't have to be a single command, if a chain of steps could do it.
I am very new to Ubuntu or any Linux for that matter. I am tring to get Mediatomb to work on my system. I have installed the packages and mediatomb appears to be running fine. The problem is that I have an external hard drive that I want my files to be kept on. When I try to add the folders on the external I get the following error:Error: Could not list directory /media/TeraByte : Permission Denied.TeraByte is the name of the volume, I have created shared folders on the Volume, but I can't seem to get anywhere with this
I want to list the images in a directory with their dimensions, if possible in order of their widths (all the wider pictures come first) - this is not strictly necessary,
How can we list only files present in a directory in Redhat linux.The LS commands lists both the files and the directories. What command can be used for the above purpose.
When I try to list files in directory. I am getting i/o error #ls -l /test I am getting i/o error. Why I am getting this error and what are these i/o errors.
red minus sign next to internet and following states..... E: Type 'cat' is not known on line 45 in source list /etc/apt/sources.list E: Unable to lock the list directory
What I'm trying to do: write a script that will list all the directories in a given location. Ask the user to enter a number corresponding to the location of the directory in the list, and then moving into that directory.
I have written a script to do this, but it only works when I run it as: <user>$program_name and the script runs in a sub-shell. But, when it is run in a sub-shell, the changes made by the script go away after the script ends.
When I run it as: <user>$. program_name and the script runs in the current source shell, I get an error: bash: cd: /home/dev/Project/dirname: No such file of directory
Code: IFS=' ' read -d '' -a ArrName < <(ls ~/Projects) read filenumber cd $HOME/Projects/${ArrName[$filenumber]}
Im looking to use PHP to list a directory. When I click on a filename, I'd like it to automatically remove the first 16 characters off of the filename and save it to the filesystem.
I'm sure I've done this before and am having a brain fart.
I have run into this a couple of time this last month:
I have a list of torrent files (blahblahhexblah.torrent) saved in a text file. I would like to read the text file and populate the client directory.
I can echo the file using:
But I cannot remember how to pipe the output into the directory, nor can I find any resources that describe the process.
Interestingly enough, I've had a couple of opportunities to do similar tasks with passwords and privileges and even across the LAN in the last few days. Solving this problem will help me solve the others for next time.