You didn't provide enough details for the first responder to answer completely. Also, your first attempt is using find - are you walking down a directory tree? or only checking in the current directory? Are you only looking for exceptions to the pattern? or searching for the filenames that correctly match?
I would start by reading the manpage for your shell - look for a section on File Name expansion or Pathname expansion. This will give you the primitive tools you can use to create a command-line that will meet your requirement... e.g.
if you shell's primitives are not sufficient, you can pipe the output of 'ls' through 'grep' to use more comprehensive regular expressions... e.g.
I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit.
Logically, I'm looking for the best way to approach this
Thanks for any assistance in advance.
Note: I'm using a C shell and... (2 Replies)
Hi All,
I need to know standard naming convention for Unix libraries (including all flavours of unix)..As I have gone through some sites and found out
The UNIX convention for naming of libraries is
lib<name>.so.<major>.<minor>.<revision>
so is it statndard . also does it change... (0 Replies)
OK, so a quick background:
I am a sys admin for a 1:1 deployment in academia with Macbooks, totaling around 6,000. Macbooks get shifted around from building to building and go to and from the repair center if hardware repair is needed. Often, some machines will get moved from one building to... (8 Replies)
Advance Thanks.
(1) I would like to know any unix/Linux command to check EOF char in a file.
(2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
For the selection of motherboards, is there any naming convention in the type numbers? There is usually a brand name and sometimes a version name, but more essential details like form factor, SATA speed and maximum amount of RAM is never given. Is there a reason for that? Is there any background... (2 Replies)
Hi ,
i have below files in wrk folder. file names are
1102090001.CLT
1102090003.CLT
1102100019.CLT
1102100020.CLT
the above files are concatenate to one file but that concatenate file name must be same naming convention. (date +%y%m%d)and 0001 count.
example : concatenate file... (9 Replies)
Hi Guys,
Where would i find the list of distribution codes.
For example.
samba-32bit-3.4.2 -1.1.3.1.x8664.rpm
In above rpm file it is indicated that its release is 1.1.3.1 .
The rpm is meant to be run for opensuse.
Where would i get the linking of release number and distribution.
... (2 Replies)
Hi,
I am installing a new RHEL 5 application server containing JBOSS along with other specific 3rd party applications. I know that this usually gets installed in /opt but I was thinking of installing these on a new separtate lv / file system instead.
i.e.
/<my_new_FS_name>
rather than... (6 Replies)
Hi
Currently we have nmon running on our Red hat Linux server.
The ouput file is now coming with the naming convention as "servername_160321_0010.nmon".
The output file naming convention has to be changed as "nmon_servername_daily_2016.03.21_00.00.00"
How can we do it ? Any suggestions... (10 Replies)
Discussion started by: newtoaixos
10 Replies
LEARN ABOUT BSD
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)