Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [recursive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
23 views

How do I delete all folders with a similar name that do not contain large files on linux commandline?

On my linux server for my media library I used a function to change show season names to have a leading zero when needed, so "Season 1" would be Season 01" and so on. The problem is ...
Graham F's user avatar
-2 votes
2 answers
93 views

find if files in one directory recursively exists in another directory recursively in linux bash and print exists or not exists

find if files in one directory recursively exists in another directory recursively in linux bash and print exists or not exists lets say you have pth1/dirA/file1 pth1/dirA/DirB/file2 and pth2/dirA/...
Estatistics's user avatar
0 votes
0 answers
325 views

wget recursive folder/file download only returns multiple index.html

wget --no-parent --recursive --level=4 https://www.example.com/jsons/ I'm using the above line to try & download all files in subfolders of that URL. The folder structure is as: https://www....
DaveF's user avatar
  • 37
1 vote
2 answers
866 views

How to copy files changed in last 20 days to a different location recusively

I found a code here (on this site) which allows copying of files changed in last 20 days. My issue is that I have a folder with many subfolders and some subfolders could be 8 or more levels deeps. I ...
Mohammed Khawaja's user avatar
1 vote
1 answer
2k views

Batch Script to delete certain files inside subfolders of a main subfolder

My problem is this I have an extensive collection of pictures spanning several sub-folders (I'm talking of several hundred of folders, not a few), under a main folder, as example: Birthdays Mom ...
diras2010's user avatar
  • 308
1 vote
1 answer
44 views

Recursive rename with negate filter not working

I want my script to recursively rename all .mov files to _Proxy.mov, BUT I also want it to SKIP any files already named _Proxy.mov. The below command is still renaming all .mov files, and is ignoring ...
Sam's user avatar
  • 11
0 votes
2 answers
868 views

Calling a Recursive Function in a Batch File

I am currently trying to write a batch file for a project that will mimic the structure of the following pseudocode: void h ( int n ) if ( n ≥ 4 ) h ( n / 2 ) end if print ...
Digital Samizdat's user avatar
1 vote
0 answers
100 views

How to display recursive geometric image in browser with infinite zooming? [closed]

Context Suppose one has a pentagonal tiling where each plane is also made up of a pentagonal tiling (if that is not possible, assume cubic). Suppose each parent is x times larger than its child. Then ...
a.t.'s user avatar
  • 413
0 votes
0 answers
2k views

recursively delete a specific directory for each user in C:\Users

Would like to use powershell to loop through all C:\Users\* and delete all contents of a subdirectory... Some users, but not all, use an app that creates cache files at: C:\Users\UserName\AppData\...
AM_Hawk's user avatar
  • 101
0 votes
3 answers
1k views

Recursively remove a character from folders in Windows

Given a folder structure: ---- folder1#name --------- folder2#name ---- folder3#name --------- folder4#name ------------ folder5#name ------------ folder6#name ------------ folder7#name I want to ...
Edd Chang's user avatar
  • 111
0 votes
0 answers
247 views

Add attribute to a file/folder

I tried that to add an attribute to a file/folder Get-ChildItem '$PATH' -Recurse | foreach{$_.Attributes = $_.Attributes + 'Compressed'} Problem is that it create a cycle like that : Not compressed &...
aac's user avatar
  • 1
0 votes
2 answers
2k views

7z - compress files in sub-directory, name them for parent folder

I'm trying to compress a folder structure like so: Root |_ Folder |_Sub Folder 1 |_Files |_Sub Folder 2 |_Files |_ *more Sub Folders* I need to create .zip file ...
Charles O'Connor's user avatar
0 votes
1 answer
1k views

Parallel processing and order of execution with recursive loop

If i run a script that processes a path recursively using parallel processing to execute a command on the whole tree if items, am I guaranteed that the commands I use will be executed on all items in ...
maja's user avatar
  • 329
1 vote
2 answers
40 views

Windows 10: deleting a directory doesn't work... but works [closed]

I am developping a application. Sometimes, I want to completely delete the building directory. When I do this I get an error from Windows, that either I don't have acess or some file(s) in the ...
Jacques's user avatar
  • 111
0 votes
2 answers
210 views

Windows7 command prompt show number of objects as list from dir command

I'm using Windows7, and I want to know the number of files (or objects) for comparison to objects in Amazon S3 buckets. I'm not interested in size, as the size can differ between file types. I want ...
Jordan's user avatar
  • 1
1 vote
1 answer
2k views

How to share the Zoom window itself in Zoom?

I want to interactively demonstrate how to use the Zoom meeting room controls to a Zoom meeting. However, Zoom doesn't seem to offer a way to share the actual Zoom window (the one you see when there ...
Foo Bar's user avatar
  • 468
0 votes
1 answer
605 views

Exclamation Points - Is there a linux bash command to find and delete all directories named "!example" (and their contents)

I have searched and searched for an answer to this question, and I have used some of the answers I found in the past for finding and deleting large numbers of directories that are named by a certain ...
Brad's user avatar
  • 1
1 vote
2 answers
608 views

recursive grep does not list matches from some files

I am using GNU grep 3.4 to find scripts that contain a certain pattern. For this, I call grep recursively like so grep -rin . -e "pattern" The pattern is just a word, no regular expression....
buddemat's user avatar
  • 162
0 votes
1 answer
779 views

Use Powershell to Download Webfiles Based on UTF8 Text File List

Aiming to download website files via powershell; get the name from each line of a text file; with UTF8 support (supporting international text names); & save the files to a directory with the ...
user avatar
0 votes
1 answer
1k views

DNSoverTLS for upstream recursion requests in Bind9/Stunnel

There is a lot of information out there about DNSoverTLS and different combinations of setups, and I've slowly been going through different combinations to get the right setup for us, but it's led to ...
oucil's user avatar
  • 277
0 votes
1 answer
640 views

Recursive search for matches in two files

On the second day, I'm trying to find a solution. There is a CCC directory; we include subdirectories with numbers 1 2 3 ... 500, in each subdirectory there is a file named A1, containing one word (...
alex77's user avatar
  • 1
0 votes
1 answer
79 views

The -r flag for directories seems to be useless now [closed]

cp, scp, rm and other command needs to the -r flag to perform an action on a directory, compared to just a file. can't copy a directory because WHOOPS you forgot the -r flag I don't feel this is ...
1blockologist's user avatar
1 vote
1 answer
693 views

Does Debian's "apt-get install" command follow "recommends" links recursively?

Debian's apt-get install command is documented as following recommends links by default. It also follows depends links, presumably in a recursive fashion. However, I haven't been able to find out if ...
Rich Morin's user avatar
4 votes
2 answers
711 views

Recursively add suffix after extension to all files in a directory

I had a ransomware attack and all files were encrypted. The encryption added a suffix to all the files after the extension for example 123.jpg became 123.jpg.[xyz@gmail].xyz I got the key and ...
LabMan's user avatar
  • 43
0 votes
0 answers
41 views

How to use cmd to move files out of redundant subfolder?

I have a large number of textfiles that are nested in subdirectories like this: D:\datafiles_01\01_data\data\{bunchoftextfiles} \... \42_data\{...
Nedimar's user avatar
1 vote
1 answer
1k views

How to recursively change modified date for folder and contents mac to current date

I'm currently using this script on a volume via folder action. for f in "$@" do touch "$f" done It changes the modified date for files and folders added to the volume to the current date with no ...
sirlouie's user avatar
0 votes
1 answer
193 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 ...
foax's user avatar
  • 38
1 vote
1 answer
3k 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, ...
raptor0102's user avatar
1 vote
3 answers
272 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 /...
loewie1984's user avatar
7 votes
3 answers
9k 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 ...
Regmi's user avatar
  • 855
1 vote
1 answer
1k 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 ...
Regmi's user avatar
  • 855
3 votes
1 answer
9k 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 ...
user260467's user avatar
3 votes
1 answer
6k 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 ...
Vince's user avatar
  • 131
1 vote
1 answer
2k 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, ...
klugg's user avatar
  • 11
1 vote
1 answer
743 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 ...
user73784's user avatar
  • 121
1 vote
1 answer
301 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.*, ...
narrator dru's user avatar
-1 votes
1 answer
1k 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? ...
Arthur's user avatar
  • 117
1 vote
0 answers
527 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 ...
user1748155's user avatar
0 votes
1 answer
370 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 ...
Mattj7's user avatar
  • 1
5 votes
2 answers
13k views

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....
Mike Godin's user avatar
3 votes
1 answer
2k 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 `--...
deostroll's user avatar
  • 1,805
0 votes
1 answer
534 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 ...
noumenal's user avatar
  • 121
1 vote
2 answers
635 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. /...
Zaz's user avatar
  • 2,556
0 votes
1 answer
610 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 ...
Peter David Carter's user avatar
1 vote
1 answer
1k 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 ...
Addison Crump's user avatar
0 votes
2 answers
92 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 ---...
jeremyb's user avatar
  • 101
1 vote
1 answer
587 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: ...
baronmax's user avatar
4 votes
3 answers
7k 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 -...
m1k3y02's user avatar
  • 285
4 votes
1 answer
5k 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 ...
Ncat's user avatar
  • 191
0 votes
2 answers
2k 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 ...
kramer65's user avatar
  • 1,424