I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
I have the following requirement.
PATHA =/opr/itr/
PATHB=/etc/data/
FILENAME=*abc*
file name is wild carded as there could be many files with name abc anywhere
I tried mv $PATHA/$FILENAME $PATHB
and I got a error that /etc/data/ can not be created
Could any one please help.
... (1 Reply)
Hi,
I have a directory with possibly around 800,000 files in it.
What is the fastest way to list file(s) in this directory with a wildcard.
for example would
ls -1 *.abcdefg.Z
or
find . -name "*.abcdefg.Z"
be the fastest way to find all of the files that end with .abcdefg.Z... (6 Replies)
I have the following snippet to concatenate about a hundred csv-files:
for file in *csv; do cat $file >> newfile; done
This line works, but before I was experimenting with the following line, which is more intuitive and is a tad more robust:
for file in *.csv; do cat $file >> newfile; done
Can... (2 Replies)
Hi,
I am trying to find a particular patter in multiple UNIX files (also contain system files,hidden files and normal files)
i am now using
CMD: egrep -ali 'pattern' *
i am not getting the required result, i just need files path and finename
Naveen (3 Replies)
Hi ,
I am looking for a command to change directory in FTP server with wildcard specified. Basically this is what i am trying.
localserver# ftp remoteserver
ftp> ls
41000_42000
42000_43000
ftp> cd 41*
550 CWD failed. '41*' : no such file or directory.
Could anyone please let me know... (6 Replies)
I want to look if there is any file inside a specific directory which was modified before 2 days.
I wrote the find command, but the problem is there is one directory and that is a random directory generated by unix, so not sure on how to code for that on the find command.
find... (5 Replies)
I'm sure this is by design, but using something like
for f in dir/*
do echo $f
done
produces unexpected (to me) results if run against an empty directory. I'd have expected it to not execute the loop, but it actually calls it with f set to 'dir/*'.
Now I know that I'm trying to protect... (2 Replies)
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
I am writing a code that can move and archve all the files in a directory except the latest file based on file pattern provided in a controlfile.
The filename is in the form of pattern. So basically we find the all the files of the pattern provided and archive all of them, leaving one latest file.... (3 Replies)
Discussion started by: Saanvi1
3 Replies
LEARN ABOUT DEBIAN
dist::zilla::role::filefinderuser
Dist::Zilla::Role::FileFinderUser(3pm) User Contributed Perl Documentation Dist::Zilla::Role::FileFinderUser(3pm)NAME
Dist::Zilla::Role::FileFinderUser - something that uses FileFinder plugins
VERSION
version 4.300020
DESCRIPTION
This role enables you to search for files in the dist. This makes it easy to find specific files and have the code factored out to common
methods.
Here's an example of a finder: ( taken from AutoPrereqs )
with 'Dist::Zilla::Role::FileFinderUser' => {
default_finders => [ ':InstallModules', ':ExecFiles' ],
};
Then you use it in your code like this:
foreach my $file ( $self->found_files ) {
# $file is an object! Look at L<Dist::Zilla::Role::File>
}
ATTRIBUTES
finder_arg_names
Define the name of the attribute which will hold this finder. Be sure to specify different names if you have multiple finders!
This is an ArrayRef.
Default: [ qw( finder ) ]
default_finders
This attribute is an arrayref of plugin names for the default plugins the consuming plugin will use as finder.s
Example: "[ qw( :InstallModules :ExecFiles ) ]"
The default finders are:
:InstallModules
Searches your lib/ directory for pm/pod files
:IncModules
Searches your inc/ directory for pm files
:MainModule
Finds the "main_module" of your dist
:TestFiles
Searches your t/ directory and lists the files in it.
:ExecFiles
Searches your distribution for executable files. Hint: Use the Dist::Zilla::Plugin::ExecDir plugin to mark those files as executables.
:ShareFiles
Searches your ShareDir directory and lists the files in it. Hint: Use the Dist::Zilla::Plugin::ShareDir plugin to setup the sharedir.
method
This will be the name of the subroutine installed in your package for this finder. Be sure to specify different names if you have multiple
finders!
Default: found_files
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-21 Dist::Zilla::Role::FileFinderUser(3pm)