Questions tagged [count]
19 questions
26
votes
6 answers
Terraform - Use nested loops with count
I am trying to use a nested loop in terraform. I have two list variables list_of_allowed_accounts and list_of_images, and looking to iterate over list list_of_images and then iterate over list list_of_allowed_accounts.
Here is my terraform…
vikas027
- 1,149
- 2
- 11
- 14
6
votes
2 answers
How to count all subfolders in an directory?
How can I count how many folders (including subfolders) I have under an specific folder?
Max
- 465
- 2
- 6
- 11
4
votes
3 answers
List top users in the most AD groups
In a Windows domain environment, how could I count the top N users with more group membership than others?
I'd like to know both the indirect and direct groups. So, I'd like this count to include the nested groups too so count the groups that are …
fedayn
- 95
- 1
- 7
4
votes
4 answers
Counting duplicates in a sorted sequence using command line tools
I have a command (cmd1) that greps through a log file to filter out a set of numbers. The numbers are in random order, so I use sort -gr to get a reverse sorted list of numbers. There may be duplicates within this sorted list. I need to find the…
letronje
- 429
- 1
- 6
- 16
4
votes
2 answers
powershell or bat - counting files in all directories and subdirec
we have a hardrive with hundreds of thousands of files
i need to figure out how many of every file extension we have
how can i do this with windowspowershell or command prompt or what ever else is available??
i need it to go through every directory.…
Alex Gordon
- 455
- 3
- 14
- 31
3
votes
7 answers
Fast way to recursively count files in linux
I'm using the following to count the number of files in a directory, and its subdirectories:
find . -type f | wc -l
But I have half a million files in there, and the count takes a long time.
Is there a faster way to get a count of the number of…
aidan
- 615
- 4
- 10
- 23
2
votes
2 answers
Tail, grep and count the instances found in one command?
I am tailing a files output and grepping for lines with certain data. I don't want to output the data to the screen but instead count the number of instances it found and send that to the screen. The number of instances can be scrolling and…
user53029
- 619
- 2
- 14
- 34
2
votes
4 answers
keep a count of each file served
I've inherited a php project from an offshore firm and I'm pretty sure that ~50% of the files are no longer used. I want to weed out the unused files so I was thinking of just tracking the number of times each file is requested or included while I…
doub1ejack
- 537
- 1
- 6
- 12
2
votes
3 answers
How to quickly count the number of files in a folder?
On a Windows 2003 Server I have an application that processes requests and stores them in a folder as a queue where a second process comes and processes these stored requests. However at times the number of files tend to reach 100,000.
Using Windows…
Andrei Rînea
- 310
- 5
- 17
2
votes
5 answers
I want to count monthly the reboot of my server pool of 1,000 servers
I want to count monthly the reboot of my server pool of 1,000 servers. Can anyone point me to a product or suggest how I would accomplish this monthly count. A portion of my servers run under MS operating system and about half under Linux. Jim4522
Jim White
2
votes
2 answers
Trying to set services to restart ANYTIME they fail. I need this setting to NEVER Expire?
When going to Services>Properties>Recovery, how can I configure these settings correctly if I want to ALWAYS restart the service after ANY failure and I need these settings to NEVER expire?
I am not understanding the definition of 'Reset fail count…
Marlena Morris
- 21
- 1
1
vote
2 answers
script to count the occurence of the particular string in the given time interval
We are trying to write a script "sendemail.sh" to count the number of occurrence of a particular string in a log file "SendEmail.log" within the given interval.
We have a log file. In that we are searching for a pattern "ReqInputMsgLog" and need to…
pruthvi
- 141
- 2
- 6
1
vote
2 answers
Linux: Find amount of "active" connections on one port
i need to monitor how many users are actively connected to one port on debian. I know i can do it with command
netstat -na |grep $port |grep ESTABLISHED |wc -l
which really gives me result - a number of connections on certain port which are…
John
- 11
- 1
1
vote
5 answers
write in all lines plus one
Can you help me with a unix script to get result like this in file:
apple1
apple2
apple3
etc.. till 100
from a file apple.txt which contains only one word - apple.
Thank you in advance!
ampersand8
- 13
- 2
0
votes
1 answer
Calculating count and percentage for specific URL from Varnishlog
I was curious on how I would go about calculating a running percentage for specific URLs...
For example, when varnishlog is executed you get a realtime output for information of incoming http requests.
Below an excerpt with some information cut…
Menelaos
- 155
- 1
- 1
- 9