Questions tagged [recursive]
91 questions
705
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 all. My…
eleven81
- 16,302
113
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/
Sridhar Ratnakumar
- 4,989
37
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…
Shane
- 393
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 splitting…
aneuryzm
- 2,195
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?
Tomba
- 395
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…
TMRW
- 1,074
- 5
- 17
- 29
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?
Phillip
- 461
- 2
- 4
- 7
13
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…
newyuppie
- 261
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?
7
votes
12 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…
n611x007
- 6,686
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…
Regmi
- 855
6
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…
brandizzi
- 175
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…
Daniel Magliola
- 1,147
6
votes
2 answers
How to recursively copy and rename files in the same directory using Windows command line
I'd like to avoid using a batch file, if possible. Based on this answer to a question about recursive renaming or moving , I've came up with the following command (for copying all files named web.foo.config to web.config in the same directory ): for…
Mike Godin
- 795
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/<dir>/ ftp:<ftp-site>/gnu/<dir>/ 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…
Frans
- 51