Questions tagged [recursive]
90 questions
638
votes
18 answers
How to copy with cp to include hidden files and hidden directories and their contents?
How can I make cp -r copy absolutely all of the files and directories in a directory
Requirements:
Include hidden files and hidden directories.
Be one single command with an flag to include the above.
Not need to rely on pattern matching at…
![](../../users/profiles/8544.webp)
eleven81
- 15,376
- 15
- 55
- 83
111
votes
2 answers
Ignore .svn when doing `diff -r`
diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore certain sub-directories (eg: .svn)?
$ diff -r src1/ src2/
![](../../users/profiles/1443.webp)
Sridhar Ratnakumar
- 4,759
- 10
- 43
- 56
35
votes
2 answers
How can I force only relative paths in "find" output?
I am attempting to create a script that can compress files with a certain extension in a number of directories into a single tar-ball. Currently what I have in the script file is:
find "$rootDir" -name '*doc' -exec tar rvf docs.tar {} \;
Where…
![](../../users/profiles/17713.webp)
Shane
- 373
- 1
- 3
- 5
25
votes
4 answers
zip: Argument list too long (80.000 files in overall)
I need to compress 80.000 files into multiple zip files. This is the command I use:
zip -s 200M photos_test/*
However I get the following error:
-bash: /usr/bin/zip: Argument list too long
What can I do to solve the issue, beside manually…
![](../../users/profiles/33979.webp)
aneuryzm
- 2,105
- 10
- 37
- 46
22
votes
3 answers
Recursive ls with conditions
Why can't I use a command like this to find all the pdf files in a directory and subdirectories? How do I do it? (I'm using bash in ubuntu)
ls -R *.pdf
EDIT
How would I then go about deleting all these files?
![](../../users/profiles/28548.webp)
Tomba
- 395
- 1
- 3
- 8
20
votes
4 answers
Get bare file names recursively in command prompt
I ran into a little snag trying to get only the filenames (no extensions or file paths) recursively.This worked for me in the root folder:
dir /b
But when i added /s to scan recursively i also got file paths before filenames which i do not want.
Is…
![](../../users/profiles/36154.webp)
TMRW
- 1,054
- 4
- 17
- 28
15
votes
2 answers
How do you search for specific text in specific file types?
Possible Duplicate:
How can I grep in source files for some text?
What's the command to search for specific text in specific file types, recursively, under the current directory?
![](../../users/profiles/95565.webp)
Phillip
- 451
- 2
- 4
- 7
11
votes
3 answers
Extract recursively using 7-Zip
I have several folders, and within each folder, there are ZIP files. I want to run a command line order to recursively go through every folder and extract in place every archived file that it finds, then move on to the next folder. Is this even…
![](../../users/profiles/58611.webp)
newyuppie
- 245
- 1
- 2
- 8
10
votes
1 answer
How to find files that don't belong to a given user
How do I recursively search for all files or directories that do not belong to given user?
![](../../users/profiles/101143.webp)
nothing-special-here
- 635
- 3
- 7
- 12
7
votes
10 answers
List all files and dirs without recursion with junctions
Is there a native|portable tool that can give me a unicode or a system local-compatible list of all files and directories under a path recursively, without recursing into junction points or links, in Windows?
For example, the built-in dir takedown…
![](../../users/profiles/129520.webp)
n611x007
- 6,336
- 14
- 61
- 88
7
votes
3 answers
mogrify - how do you recurse through subfolders in Windows
I thought there was a simple switch in mogrify command options that tells it go through subfolders as well. I didn't find any. On Linux, the "find" command seems to do the trick, how do you do this on Windows?
magick mogrify -resample 72 -resize…
![](../../users/profiles/22364.webp)
Regmi
- 845
- 3
- 15
- 30
6
votes
4 answers
Mass Checksumming tool for Windows?
I'm looking for a command line tool for windows that will go over a directory tree (recursively) and output a list of all the files in there, and a checksum for each file (can be CRC, MD5, whatever).
Esentially, what I want is to compare 2 big…
![](../../users/profiles/2433.webp)
Daniel Magliola
- 1,129
- 5
- 20
- 25
5
votes
2 answers
wget - only getting .listing file in every sub-dir
if I use the command
wget --no-remove-listing -P ...../debugdir/gnu// ftp:/gnu//
I will get the .listing file of that directory. But I have to step through each subsequent sub-directories to get the whole structure. Is there a…
![](../../users/profiles/133684.webp)
Frans
- 51
- 1
- 1
- 3
5
votes
1 answer
How to chown large group of files based on previous owner id?
I created a new account in OS X and disposed of my old one.
I have a bunch of files that now have owner 501 that need to have ownership changed to me
[/usr/local]$ ll
total 24
drwxrwxr-x 18 root admin 612B Oct 20 11:01 ./
drwxr-xr-x@ 14 root …
![](../../users/profiles/26787.webp)
macek
- 6,035
- 17
- 46
- 57
5
votes
3 answers
Recursive download of subfolder with wget - --no-parent apparently not working
I need some documentation about XUL but I do not have Internet access most of the time. So, I've tried to download the Mozilla Tutorial with the following command:
wget --no-parent -r -l 2 -p -k https://developer.mozilla.org/en/XUL_Tutorial
My…
![](../../users/profiles/59006.webp)
brandizzi
- 165
- 1
- 1
- 6