Tagged Questions
-1
votes
2answers
31 views
How to search a tree folder
How can I do a search of all directories calles i18n under trees like src/main/resources using find or any other unix command.
Everything I'm trying doesn't work
I'm looking for something like:
...
0
votes
1answer
151 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 ...
2
votes
4answers
388 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 ...
21
votes
4answers
22k views
Bash script to delete files older than x days with subdirectories
I'm trying to delete a ton of files older than x days.
Now I have a script to do that
find /path/to/files* -mtime +10 -exec rm {} \;
But this will also delete the subdirectories. There are a ton ...
3
votes
2answers
656 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
382 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.
6
votes
3answers
13k views
linux find folder inside sub folders
I am trying to find a directory named 480debugerror nested under child directories. I don't know the exact path, or even if I have the exact spelling of the directory I ant to find.
Is there any ...
2
votes
2answers
6k 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
1k 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
1k 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
349 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
489 views
Find for Windows gives “Access Denied” when trying recurse into lower directories? (Windows Vista)
for instance the command:
find "" *
yields:
Access denied - STUFF