Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [recursive]

The tag has no usage guidance.

0
votes
1answer
34 views

Copy files from folders which contain less than a number of files

Coming from Bash: Find folders with less than x files find . -type d -exec sh -c 'set -- "$0"/*.flac; ! [ -e "$1" ]' {} \; -print How do I extend the line to now recurse through the resulting list ...
0
votes
1answer
27 views

recursively wget in specific folder

I'm trying to get files from HTTP using wget command. I need every file in: http://9.9.9.9/a/b/c/d/ which is not a directory. I was trying it by: -A log,html,tgz,zip,txt,css,js In addition, ...
0
votes
0answers
71 views

Purging files using Robocopy with filter applied

I'm trying to purge files that are older than x-days and that do not match certain file wildcard mask. Specifically, all files and directories older than 7 days and that do not end in underscore _ ...
1
vote
3answers
100 views

PowerShell: Rename/delete files in a folder that can appear at different places in the file hierarchy

Currently trying to figure out a way to rename PDF files in a certain folder (/root) that are directly or indirectly inside a purchases folder that is itself directly or indirectly inside the /...
1
vote
0answers
34 views

Creating a New file in Multiple folders [closed]

Very new to ISE and scripting.. Looking to create a file in multiple already created folders. I have tried the below but get a could not find part of the path error. $Folders = @(Get-ChildItem -...
1
vote
1answer
552 views

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 ...
1
vote
1answer
64 views

search and copy files from a directory structure by reading a text file

I have a folder with many subfolders and files in them. I have a text file with the names of the files that I want copied to a separate destination folder. The filenames in the text file do not have ...
1
vote
1answer
794 views

PowerShell command for ffmpeg to process items in a folder recursively

I'm trying to figure out what PowerShell command [or script if necessary] might allow ffmpeg to recursively traverse a directory, pull stills via the -vf flag, and put all the stills into a folder ...
2
votes
1answer
659 views

Recursively list dependencies of a package in arch linux

I'm trying to download driver of the AUR to install on a newly installed system (having no internet connection), however when I type makepkg -s It requires other packages to be installed. Being that ...
0
votes
1answer
101 views

What command can delete duplicates in a directory tree?

When I migrated a user from Google Drive to OneDrive using Multcloud, there were created duplicates of a lot of directories and files. Not all, but a big lot. We're talking thousands of directories, ...
1
vote
0answers
59 views

diff won't work recursively

I'm trying to recursively diff two directories using the command line diff util. I have two folders, diff1 and diff2, with contents like this: diff2 is empty. But when I do diff -r diff1 diff2 I only ...
1
vote
1answer
88 views

Batch rename file names, retain ext?

(Win10) In a batch file, how do I recursively rename filesnames in a folder? Not the extension. e.g. Files to rename: heavy.doc, bright.jpg, fast.docx, quiet.png, etc Rename to: A1.*, A2.*, A3.*, ...
-1
votes
1answer
650 views

How to remove folders with same name recursively?

I have folder, that contains a lot of subfolders. Each subfolder contains folder with name __pycache__. How to remove folders with name __pycache__ in each subfolder from command line in Windows? ...
1
vote
0answers
146 views

if one nameserver goes down, does that periodically reduce query performance?

If I have multiple NS records for a zone, and one of those authoritative name servers goes down for an extended period of time, does that occasionally slow down all queries because the recursive DNS ...
0
votes
1answer
146 views

Recursively delete files of a certain extension - File name is too long (Win Server 2012)

A while back, I created .hash files for all files in a given folder structure for verification purposes. I no longer need them and they are minor annoyance/cause for alarm. I am trying to ...
1
vote
1answer
3k views

How to recursively copy files 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....
0
votes
1answer
536 views

making sense of wget -r output

This is the output of tree command in one directory: . |-- asdf.txt |-- asd.txt |-- fabc | |-- fbca | `-- file1.txt |-- fldr1 |-- fldr2 | `-- index.html |-- fldr3 | |-- cap.txt | `-- f01 `--...
0
votes
1answer
282 views

The status of folders and metadata in VLC

When using Random in VLC, the probability of a folder being played is equal to that of a root file. In other words, the sampling is stratified by the top folder in the root. However, once a folder is ...
1
vote
2answers
415 views

Why is entire website not downloaded?

I tried to make a copy of the site wiredhealthresources.net using the command: wget -rpkl inf wiredhealthresources.net But the command only downloaded 54 files! Most of the pages are missing, e.g. /...
0
votes
1answer
100 views

How to retrieve a complete directory from a URL [duplicate]

Is there a method on Windows or Linux for downloading all files* within an online directory, specifically: http://download.opensuse.org/tumbleweed/ so I have a local repository I can work on? Any ...
1
vote
1answer
403 views

rm -rf / on a virtual machine?

So, this is probably a stupid question, but I'm genuinely interested. Would it be safe to recursively delete everything on a virtual machine from a command line, just for fun? I'd assume so, given ...
0
votes
2answers
81 views

Copy linux directory into another one - delete contents

BIG EDIT: I currently have a directory with folders and files inside: -css --addons ---myaddon ----addon -----firsfile.xml -----secondfile.xml ----cfg -----anotherfile.cfg -----lastcfg.cfg ---...
1
vote
1answer
337 views

Wget having trouble just saving the files I want - exclude directories doesn't seem to work

I want to download all government spending over £500 by the Department of Energy and Climate change. These are .xls and .xlsx files, generated once per month. They are stored at locations like this: ...
2
votes
2answers
2k views

bash: find and zip all subfolders of a folder

how would one find all subfolders of a folder and zip them separately ? folder structure ./folder -subfolder_1 -subfolder_2 -subfolder_3 expected result: ./folder -...
3
votes
1answer
2k views

git submodule foreach git pull origin master vs. git pull --recursive-submodules

I manage a repository with several submodules. For a while now I've been using $ git submodule foreach git pull origin master to pull in the latest changes for all of these guys. However, recently I ...
0
votes
2answers
815 views

Why does `rm -rf`` silently fail?

[EDIT] Please don't waste your time reading my question below. It turns out my colleague is an idiot.. :) On my server I'm trying to remove a folder and all its subfolders with the usual rm -rf ...
0
votes
0answers
164 views

Batch file - List Files by extension

I am looking to get a total number of files by extension in a folder that contains many subfolders. Example Output: .doc: 6 files .xls: 10 files etc I want to either output the results into a ...
0
votes
1answer
5k views

Recursively process zip archives to extract files while discarding specific format of files

UPDATE: I noticed that many people are viewing this thread, which makes me believe that this situation is not so rare after all. Anyway, I had asked a similar/related question on SO here, which has ...
0
votes
0answers
434 views

How can I list all files recursively that have the compressed attribute set?

I started a decompress operation using compact /U /S /I /Q > compact-report.txt on a large dir (120GB+, ~950M+ files) and it has been going on for about 24 hours now. Most files seem decompressed, ...
0
votes
1answer
58 views

How to group “Only in” lines in diff at the beginning of the output

I did: diff -r directory1/ directory2/ Some files are different, and some files were only in one tree or the other, creating several Only in ... lines. How do I group these lines at the beginning ...
1
vote
2answers
919 views

Tail and grep recursively?

Trying to tail though a list of domains to search for a hacker code. All the files that I'm looking for are the same so I was trying something like this: grep -rnl * -e "Ai9LbaFz7lC13SwzDxAYT72vwA" ...
0
votes
2answers
2k views

How to recursively zip every file in each folder?

I am trying to write a batch script that when run into a folder, it takes all the files in this folder and zip them into one, then takes the remaining folders and looks into them and do the same, ...
2
votes
1answer
4k views

PowerShell touch all files newer than

I have found the following question on ServerFault: Windows recursive touch command Which partially answers my question with this answer: Windows recursive touch command However, I would like to ...
3
votes
1answer
1k views

How do you remove nested empty directories using a Bash script on Linux?

I want to be able to run a script that will remove all my empty directories. The problem is some of them are nested, i.e. directories that only have empty directories in them, so the script needs to ...
2
votes
1answer
797 views

rm -r only files?

Is there an way to remove all the files from the current dir (recursively), keeping the directory structure?
3
votes
10answers
8k views

List all files and dirs without recursion with junctions

Is there a native|portable tool that can give me an unicode (or at least system local-compatible) list of all files and directories under a path recursively, without recursing into junction points or ...
3
votes
3answers
692 views

Why doesn't this for loop work?

This is on Ubuntu 12.04 I'm trying to figure out how to get ffmpeg to do a batch conversion of FLACs to MP3, recursively. If I cd into a directory and use for f in *.flac; do ffmpeg -i "$f" -c:a ...
1
vote
1answer
74 views

Copy permissions from owner

How can I copy the all file permissions of a folder from owner to users? Imagine that I have: -rw-r----- 1 124982 5000 201 2012-06-24 06:45 documentation.html I want to change to: -rw-r--r-- 1 ...
0
votes
1answer
203 views

Does “chmod -R 700 directory_1” update directories pointed by softlinks?

Does "chmod -R 700 directory_1" update directories under softlinks? Forexample, there is a softlink under directory_1 folder: "my_softlink". And my_softlink points to a directory_2. Will permissions ...
3
votes
1answer
110 views

Windows program / tool needed for recursively searching through files referenced from within a file

Following scenario: I browse for unsafeMethodCall() in all my web pages. This method is only unsafe in case that there is a reference of doSomeCrazyAjaxStuff() My web pages are using strong ...
0
votes
1answer
1k views

How to Unzip files recursively in Linux / DOS

I have a zipped folder which contains thousands of zipped folders contained in itself and that goes down the hierarchy, I have to unzip each and every file and place it in a single folder. This task ...
4
votes
1answer
9k views

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 ...
2
votes
1answer
3k views

Windows CMD command to run a command inside every subdirectory?

I have a batch script I wrote called "joiner.bat." It needs to run inside each of 730 sub-directories of a folder. The joiner.bat file has already been copied into each of the sub-folders, it just ...
0
votes
3answers
5k views

How to recursively extract all .tar and .tgz file zipped in a .tgz file using 7zip command line version

I'm using 7zip cmd line version in my app (written in Python on Win 7 box) to extract .tgz files. Although I'm using the -r switch, the .tar and .tgz subdirectories are not extracted. Can someone tell ...
1
vote
1answer
2k views

Looking for software that will batch convert a folder tree containing CHM files in different folders to EPUB [closed]

I have a folder tree with varying folder levels and within each folder are a number of CHM files (Compiled HTML files). I would like a tool to batch convert all of these to EPUB (book) by just ...
4
votes
1answer
990 views

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 ...
8
votes
1answer
5k views

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?
13
votes
2answers
22k views

How do you search for specific text in specific file types? [duplicate]

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?
16
votes
3answers
51k views

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 ...
3
votes
3answers
8k views

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 ...