11-29-2006
recursive wc on a directory?
Hi all,
I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice?
thanks in advance!
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Am trying for a script which should delete more than 15 days older files in my current directory.Am using the below piece of code:
"find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/ls -altr {} \;"
"find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/rm -f {} \;"
... (9 Replies)
Discussion started by: puppala
9 Replies
2. Programming
I want to copy a directory recursively ( it again has directories) and the directory is on windows and is nfsmounted in vxWorks, i am using unix to develop the code for this, can any one suggest me how to copy the directories recursively. (7 Replies)
Discussion started by: deepthi.s
7 Replies
3. UNIX for Dummies Questions & Answers
i'm playing around with "ls" and "find" and am trying to get a print out of directories, with full path, (recursive) and their ownership.... without files or package contents (Mac .pkg or .mpkg files). I'd like it simply displayed without much/any extraneous info.
everything i've tried, and... (5 Replies)
Discussion started by: alternapop
5 Replies
4. Programming
What is the best way to completely remove dir with it's content ???
rmdir deletes only EMPTY dirs as i know.
The man page of remove function says "remove() deletes a name from the file system." Can it remove any dir recursively ??? :rolleyes: (7 Replies)
Discussion started by: Trump
7 Replies
5. UNIX for Advanced & Expert Users
I was working on a shell script and found that the find command took too long, especially when I had to execute it multiple times. After some thought and research I came up with two functions.
fileScan()
filescan will cd into a directory and perform any operations you would like from within... (8 Replies)
Discussion started by: newreverie
8 Replies
6. UNIX for Dummies Questions & Answers
I want to copy a file from the top directory into all the sub-folders and all of the sub-folders of those sub-folder etc. Does anyone have any idea how to do this?
Thanks in advance of any help you can give. (3 Replies)
Discussion started by: EinsteinMcfly
3 Replies
7. UNIX for Beginners Questions & Answers
Attempting to recursive chattr directories while excluding a directory, however the command which works with chown does not seem to with chattr
find /mysite/public_html ! -wholename '/mysite/public_html/images' -type d -exec chattr -R +i {} \;
find /mysite/public_html -not -path "*/images*"... (2 Replies)
Discussion started by: carnagel
2 Replies
LEARN ABOUT XFREE86
dh_installdeb
DH_INSTALLDEB(1) Debhelper DH_INSTALLDEB(1)
NAME
dh_installdeb - install files into the DEBIAN directory
SYNOPSIS
dh_installdeb [debhelperoptions]
DESCRIPTION
dh_installdeb is a debhelper program that is responsible for installing files into the DEBIAN directories in package build directories with
the correct permissions.
FILES
package.postinst
package.preinst
package.postrm
package.prerm
These maintainer scripts are installed into the DEBIAN directory.
Inside the scripts, the token #DEBHELPER# is replaced with shell script snippets generated by other debhelper commands.
package.triggers
package.shlibs
These control files are installed into the DEBIAN directory.
Note that package.shlibs is only installed in compat level 9 and earlier. In compat 10, please use dh_makeshlibs(1).
package.conffiles
This control file will be installed into the DEBIAN directory.
In v3 compatibility mode and higher, all files in the etc/ directory in a package will automatically be flagged as conffiles by this
program, so there is no need to list them manually here.
package.maintscript
Lines in this file correspond to dpkg-maintscript-helper(1) commands and parameters. However, the "maint-script-parameters" should not
be included as debhelper will add those automatically.
Example:
# Correct
rm_conffile /etc/obsolete.conf 0.2~ foo
# INCORRECT
rm_conffile /etc/obsolete.conf 0.2~ foo -- "$@"
In compat 10 or later, any shell metacharacters will be escaped, so arbitrary shell code cannot be inserted here. For example, a line
such as "mv_conffile /etc/oldconffile /etc/newconffile" will insert maintainer script snippets into all maintainer scripts sufficient
to move that conffile.
It was also the intention to escape shell metacharacters in previous compat levels. However, it did not work properly and as such it
was possible to embed arbitrary shell code in earlier compat levels.
The dh_installdeb tool will do some basic validation of some of the commands listed in this file to catch common mistakes. The
validation is enabled as a warning since compat 10 and as a hard error in compat 12.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
11.1.6ubuntu2 2018-05-10 DH_INSTALLDEB(1)