Sponsored Content
Full Discussion: ls specify file
Top Forums Shell Programming and Scripting ls specify file Post 302094661 by happyv on Monday 30th of October 2006 11:31:02 PM
Old 10-31-2006
ls specify file

How can I ls the file with *.archived only. Because of the directory have a lot of file like
CDBACKUPJOHN00002_9_4_bfmh.archived CDBACKUPJOHN00002_9_4_bfma.archived CDBACKUPJOHN00002_9_4_bfmc.archived
CDBACKUPJOHN00002_9_32_bfmh.archived
CDBACKUPMARY0001_orig.archived
CDBACKUPMARY0001.archived

part of script:
#!/bin/sh
/bin/rm result_list.txt
while read name
do
ls -1 /appl/CH_DATA/archive/00000/CACHE/${name}*.archived | grep -v _9_4_bfmh.archived | grep -v _orig.archived >> result_list.txt
done <need_to_search.txt
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

2. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

3. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
FAXQCLEAN(8)						      System Manager's Manual						      FAXQCLEAN(8)

NAME
faxqclean - HylaFAX queue cleaner process SYNOPSIS
/usr/sbin/faxqclean [ options ] DESCRIPTION
faxqclean is a program that processes completed HylaFAX jobs and expunges unreferenced document files. This program is intended to be invoked by cron(8) on behalf of the super user (i.e. root) one or more times a day. For example, the following crontab entry might be set- up for root to run faxqclean each hour. 0 * * * * /usr/sbin/faxqclean When faxqclean is run it scans the doneq subdirectory in the HylaFAX spooling area and process each job according to the doneop field spec- ified in the job description file; c.f. sendq(5). Jobs that are marked for removal are purged and references to documents are removed. Jobs that are marked for archival may be archived depending on the options supplied on the command line. After scanning for completed jobs faxqclean scans the docq subdirectory and builds up a table of document files. Files that are not refer- enced by any job and that are older than a specified threshold are removed. OPTIONS
-a Enable job archiving support. -A This option forces archiving even if 'doneop' in the queue file is not 'archive', i.e. even if the user submitted the job without specifying the -A flag to sendfax -j secs Set the job age threshold (in seconds) that controls how long jobs may reside in the doneq directory before being processed. By default this value is 15 minutes (15*60 = 900 seconds). -d secs Set the document age threshold (in seconds) that controls how long unreferenced files may reside in the docq directory before being removed. By default this value is 1 hour (60*60 = 3600 seconds). -n Do not carry out any work; just show what would be done. This option is useful together with the -t option for debugging. -q dir The specified directory is treated as the spooling area. The default spooling area, /var/spool/hylafax, is defined at the time the software is built. -t Trace in great detail exactly what faxqclean is doing. Messages are sent to the standard output. -v Print messages on the standard output about jobs removed or archived and about document files removed. FILES
/var/spool/hylafax/doneq directory to scan for completed jobs /var/spool/hylafax/docq directory to scan for unreferenced documents /var/spool/hylafax/archive directory where archived jobs are placed Consult hylafax-server(5) for a complete discussion of the structure and content of the spooling area. SEE ALSO
faxq(8), hylafax-server(5), sendq(5), doneq(5), archive(5). March 14, 1996 FAXQCLEAN(8)
All times are GMT -4. The time now is 03:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy