0
votes
1answer
250 views

Exclude all hidden directories in UNIX find

I'm doing a word search using the following command: find . -exec grep -q [some_word] '{}' \; -print -o -name .svn -prune -o -name .ssh -prune -o -name .boneyard -o -name log -prune -prune -o -name ...
3
votes
4answers
2k views

Finding subdirectories inside all directories with the same name

I want to run a command to: Find all directories named "inc" under a folder "X". List all the subdirectories under each "X/.../inc/". Redirect the output to a file named "list" I tried various ...
4
votes
2answers
2k views

How to physically reorder files `03.mp3 01.mp3 02.mp3` (`ls -f`) in a directory?

The physical order of the files matters when I copy them onto my USB stick and listen in car mp3 player. Most of my music album folders are unsorted, e.g. ls -f may produce: 03.song3.mp3 01.song1.mp3 ...
0
votes
1answer
560 views

UNIX: Find all directories that match string and copy a file there

I was wondering how to file all directories that match a string and then if found, copy a file from root to that directory.
2
votes
2answers
9k views

Unix - List all directories and subdirectories, excluding directories without files

I would like to list all the directories and sub directories in and below the current path. Since I only wanted to display directories I came up with the follwing command: find -type d -exec ls -d1 ...
4
votes
2answers
2k views

Using “find” to list only directories with no more childs

How can only directories be listed, that do not have another child directory? Imagine a structure like /A /A/AA /A/AB /A/AB/ABB /B /C /C/CC /C/CC/CCC /C/CC/CCC/CCCC I would like to use find to list ...
1
vote
2answers
2k views

Bash: Find folders with less than x files

How would I go about finding all the folders in a directory than contain less than x number of .flac files?
1
vote
2answers
400 views

Prevent rmdir -p from traversing above a certain directory

I hacked together this script to rsync some files over ssh. The --remove-source-files option of rsync seems to remove the files it transfers, which is what I want. However, I also want the directories ...
0
votes
1answer
635 views

Find for Windows gives “Access Denied” when trying recurse into lower directories? (Windows Vista)

for instance the command: find "" * yields: Access denied - STUFF