hi Gurus,
can anyone provide a awk command to get teh count of number of file sin a specific directory.
appreciate any kind of information..
thanks (11 Replies)
I need to find the line count of multiple strings in a particular file. The strings are as follows:
bmgcc
bmgccftp
bsmsftp
bulkftp
cctuneftp
crbtftp
crmpos
cso
gujhr
I am doing manual grep for each of the string to find the line count. The command i am using right now is:
grep mark... (3 Replies)
Hello,
I'm looking for a wait to count the number of occurrences of a certain string of characters within a file. The file that I trying to parce has segments within the file that have a header and footer to each segment and I'm trying to do a count of the header string and compare it to a count... (9 Replies)
I want the output of the find command to be printed and also the total files found by it. Can someone help in this.
Obviously $ find . -type f | wc -l will not output the files found but only the count. I want both. There can be millions and trillions of files so dont want the output of find... (3 Replies)
Hi all,
I want to create a symlink on a link file, i mean, there is a file which is actually a symlink of some version. Now i want to create one more symlink on that link file.
EX: there is a file:
uat -> version
prod -> version
Now i want to create one more link on these 'uat' and... (1 Reply)
Hi Forums,
I got a little problem, I made a few modifications to the code of the launch script of a testing server(minecraft) and now updating is broken aswell as the automatic directory creation.
These Lines somehow create an endless symlink that refers to itself and I don't know how to fix... (0 Replies)
Hi All,
This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance.
For a project I need to do the following.
1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Hi All,
I have transaction in one file.I want to match that to another file and find the number of time the transaction is available on the other file.I need to take each record from TRANSFILE and match that with SPEND FILE and find the number of counts of the transaction
TRANSFILE:
... (4 Replies)
Hello,
On Solaris 10, here are entries for logs in httpd.conf
ErrorLog "|/export/apache/apache-2.2.17/bin/rotatelogs -l -f /var/log/apache/error_log.%Y%m%d 86400"
It keeps creating daily logs with below names -
-rw-r--r-- 1 root root 1016747232 Apr 5 23:59... (16 Replies)
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
LEARN ABOUT DEBIAN
file::spec::link
File::Spec::Link(3pm) User Contributed Perl Documentation File::Spec::Link(3pm)NAME
File::Spec::Link - Perl extension for reading and resolving symbolic links
SYNOPSIS
use File::Spec::Link;
my $file = File::Spec::Link->linked($link);
my $file = File::Spec::Link->resolve($link);
my $dirname = File::Spec::Link->chopfile($file);
my $newname = File::Spec::Link->relative_to_file($path, $link);
my $realname = File::Spec::Link->full_resolve($file);
my $realname = File::Spec::Link->resolve_path($file);
my $realname = File::Spec::Link->resolve_all($file);
DESCRIPTION
"File::Spec::Link" is an extension to "File::Spec", adding methods for resolving symbolic links; it was created to implement
"File::Copy::Link".
"linked($link)"
Returns the filename linked to by $link: by "readlink"ing $link, and resolving that path relative to the directory of $link.
"resolve($link)"
Returns the non-link ultimately linked to by $link, by repeatedly calling "linked". Returns "undef" if the link can not be resolved.
"chopfile($file)"
Returns the directory of $file, by splitting the path of $file and returning (the volumne and) directory parts.
"relative_to_file($path, $file)"
Returns the path of $path relative to the directory of file $file. If $path is absolute, just returns $path.
"resolve_all($file)"
Returns the filename of $file with all links in the path resolved, wihout using "Cwd".
"full_resolve($file)"
Returns the filename of $file with all links in the path resolved.
This sub tries to use "Cwd::abs_path" via "->resolve_path".
"resolve_path($file)"
Returns the filename of $file with all links in the path resolved.
This sub uses "Cwd::abs_path" and is independent of the rest of "File::Spec::Link".
Object methods
"new([$path])"
create new path object: stores path as a list
"path"
returns path as a string, using catpath
"canonical"
returns canonical path, using canonpath
"vol"
returns volume element of path, see File::Spec->splitpath
"dir"
returns directory element of path, as a string, see File::Spec->splitpath
"dirs"
return list of directory components in path, see File::Spec->splitdir
"pop"
remove last component of the path
"push($file)"
add a file component to the path, ignoring empty strings
"add($file)"
add a component to the path: treating "updir" as "pop", and ignoring "curdir" and empty strings
"split($path)"
populate a path object, using splitpath
"chop"
remove and return a file component from path, an empty string returns means this was root dir.
"relative($path)"
replace the path object with the supplied path, where the new path is relative to the path object
"follow"
follow the link, where the path object is a link
"resolved"
resolve the path object, by repeatedly following links
"resolvedir"
resolve the links at all component levels within the path object
Other class methods
"canonpath($path)"
Wrapper round File::Spec::canonpath, fatal if empty input
"catdir(@dirs)"
Wrapper round File::Spec::catdir, returns "curdir" from empty list
"splitlast($path)"
Get component from $path (using "chop") and returns remaining path and compenent, as strings. [Not used]
EXPORT
None - all subs are methods for "File::Spec::Link".
SEE ALSO File::Spec(3)File::Copy::Link(3)AUTHOR
Robin Barker, <Robin.Barker@npl.co.uk>
COPYRIGHT AND LICENSE
Copyright 2003, 2005, 2006, 2007 by Robin Barker
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.4 2011-09-30 File::Spec::Link(3pm)