Sponsored Content
Top Forums Shell Programming and Scripting [FUN] Get some stats of your project/s Post 302943296 by MadeInGermany on Thursday 7th of May 2015 05:35:44 AM
Old 05-07-2015
I wonder if you want to skip .git directories.
Then a -prune in find is more efficient.
Also it is more efficient to run the find once, and count the FILES in the loop.
Code:
FILES=0
for F in $(find . -type d -name ".git" -prune -o -type f \! -name ".jpg" -print)
do
    ((FILES+=1))
    ... # only files, dont need to test again
done

NB the -print is needed: by explicitly printing the files it will not print the pruned directories.
This User Gave Thanks to MadeInGermany For This Post:
 

6 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Fun with FreeBSD

Fun With Automounting on FreeBSD Link: Nice tips for FreeBSD Unix. http://ezine.daemonnews.org/200202/automounting.html (2 Replies)
Discussion started by: killerserv
2 Replies

2. Solaris

SSH doesn't pick up user's project from /etc/project

We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)
Discussion started by: kurgan
2 Replies

3. What is on Your Mind?

fun scripts

Lets get a list of everyones funny scripts (8 Replies)
Discussion started by: JamieMurry
8 Replies

4. Solaris

what is the use of /etc/project file and project administration commands?

i have two doubts.. 1. what is the use /etc/project file. i renamed this file and when i tried to switch user or login with some user account the login was happening slowly. but when i renamed it to original name it was working fine... why so? 2. unix already has useradd and grouadd for... (4 Replies)
Discussion started by: chidori
4 Replies

5. News, Links, Events and Announcements

A new project was posted on The UNIX and Linux Forums project board.

A new project was posted on your project board. Project title: Bash Shell Tutoring Estimated Budget: $50/hr Start date: Immediately Required skills: Linux, Bash, Shell, UNIX I work as a datawarehouse designer and developer. Although I usually stick to the role of an analyst,... (0 Replies)
Discussion started by: Neo
0 Replies

6. Shell Programming and Scripting

FINDING DUPLICATE PROJECT ( directory project )

I have a project tree like that. after running find command with the -no -empty option, i am able to have a list of non empty directory DO_MY_SEARCH="find . -type d -not -empty -print0" MY_EXCLUDE_DIR1=" -e NOT_IN_USE -e RTMAP -e NOT_USEFULL " echo " " > $MY_TEMP_RESULT_1 while... (2 Replies)
Discussion started by: jcdole
2 Replies
MIXMASTER-UPDATE(1)						 mixmaster-update					       MIXMASTER-UPDATE(1)

NAME
mixmaster-update - Fetch new reliability stats and keyrings for mixmaster SYNOPSIS
mixmaster-update [--verbose] [--source=SOURCE] [--configfile=FILE] [--destination=DIRECTORY] mixmaster-update --list-sources mixmaster-update --help mixmaster-update --version DESCRIPTION
mixmaster-update is a simple yet configurable script that downloads latest remailer reliability statistics and keyrings for your mixmaster. As having uptodate reliability statistics is imperative if you want to make use of remailers it is recommended that you always update this data should it be older that twelve or twentyfour hours and you intent to use mixmaster. mixmaster-update has several built in stats sources. You can view the list of stats sources with the --list-sources parameter. If you want to make use of another stats source which is not listed in the output of --list-sources you can do so by setting the location of mlist and others in your configuration file. OPTIONS
--verbose Print verbose output to standard output. May be given more than once to increase verbosity. --source=SOURCE Use this built in stats source. --configfile=FILE Also parse the configuration file FILE. --destination=DIRECTORY Write output to DIRECTORY rather than the directory given in the config file or ~/.Mix/. --list-sources List available stats sources. --help Print a brief help message and exit successfully. --version Print a version information and exit successfully. FILES
/etc/mixmaster/update.conf ~/.Mix/update.conf MIXMASTER_UPDATE_CONF environment --configfile parameter These files are parsed in this order. Later definitions overwrite older ones. This config file defines proxy settings, where to write the results to and which stats source to use /etc/mixmaster/allpingers.txt ~/.Mix/allpingers.txt MIXMASTER_ALLPINGERS environment --allpingers parameter These files are parsed in this order. Later definitions overwrite older ones. The allpingers.txt is a list of all pingers. FILEFORMAT
The update.conf configuration file for mixmaster-update is simple. Lines with whitespace only are ignored as are lines that have the hash our pound ("#") sign as their first non whitespace character. Lines are always truncated at the first hash our pound ("#") sign. Lines are pairs of keys and values separated by a convenient amount of whitespace. The key is case insensitive. Allowed keys: source Use the builtin stats source with this name destination Write the downloaded data to this directory rather than ~/.Mix proxy Set proxies for different protocols. The value is split into two parts: protocol and proxy URL. They are separated by whitespace. Example: PROXY http http://proxy.example.com:8080/ PROXY ftp http://proxy.example.com:8080/ The format for allpingers.txt is simple too: [example] base = http://stats.example.net/ rlist = http://stats.example.net/rlist.txt mlist = http://stats.example.net/mlist.txt rlist2 = http://stats.example.net/rlist2.txt mlist2 = http://stats.example.net/mlist2.txt rlist_html = http://stats.example.net/rlist.html mlist_html = http://stats.example.net/mlist.html rlist2_html = http://stats.example.net/rlist2.html mlist2_html = http://stats.example.net/mlist2.html rchain_html = http://stats.example.net/mlist2.html pgpring = http://stats.example.net/pgp-all.asc pgpring_rsa = http://stats.example.net/pgp-rsa.asc mixring = http://stats.example.net/pubring.mix type2list = http://stats.example.net/type2.list The file may contain several such definitions. ENVIRONMENT
MIXMASTER_UPDATE_CONF MIXMASTER_ALLPINGERS See the FILES section abobe. HOME Your homedirectory. Used for finding your user configuration file. Also the default destination directory is $HOME/.Mix/ SEE ALSO
mixmaster(1) BUGS
Please report them to the Debian Bug Tracking System as described at "http://bugs.debian.org/" or use a tool like reportbug(1). AUTHOR
Peter Palfrader <peter@palfrader.org> $Revision: 459 $ 2013-02-08 MIXMASTER-UPDATE(1)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy