Sponsored Content
Top Forums Shell Programming and Scripting Matching a file with extension tmp Post 302270851 by reddyrajal on Tuesday 23rd of December 2008 04:11:20 AM
Old 12-23-2008
try this
#!/bin/sh

COUNTER=0
echo -n "Enter the directory path: ";
read DIRECTORY
echo $DIRECTORY
cd $DIRECTORY

for FILE in `ls | grep -v _tmp$ `
do

echo $COUNTER $FILE

if [ -e ${FILE}_tmp ]
then
COUNTER=`expr $COUNTER + 1`
array[$COUNTER]=${FILE}_tmp
fi
done
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

monitoring /tmp and /var/tmp for suspicous activity

Hello, does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present? Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies

2. Solaris

after init all /tmp file has been removed

I'm new in Solaris server After the system support reboot the Solaris server, all the files in /tmp has been removed, is that normal under Solaris or under different init level will get different result? which init level will do that? (5 Replies)
Discussion started by: yesthomas
5 Replies

3. UNIX for Dummies Questions & Answers

howto change parameter in vi to take tmp file

i have a problem running vi. there is no space in /var where it creates tmp file. How can I change this parameter so that it takes from other directory. thanks (4 Replies)
Discussion started by: ajaya
4 Replies

4. HP-UX

Error: file </tmp/srw25108193> does not exist

Hi Everybody I need help from you guys. I'm getting this message on PC where i'm running Unix User using Reflection in order to get graphically format for Oracle Report Server. What is causing this msg and how to solve it? Regards and thanks in advance. Gege *Error: file... (0 Replies)
Discussion started by: cgege
0 Replies

5. Shell Programming and Scripting

Removing tmp file too quickly?

Still trying to get the basics down and I would like a different solution to what I'm currently doing and a better understanding of why it's happening. I've written a simple backup script that tars individual directories and then dumps them to a NFS drive. STDERR is being dumped into a process... (2 Replies)
Discussion started by: mandelbrot333
2 Replies

6. AIX

/tmp file system full

Hi, I would like to know if /tmp file system is full, wheather it will affect the peformance of application installed on AIX. if Memory and CPU are not heavily utilized. Regards, Manoj. (1 Reply)
Discussion started by: manoj.solaris
1 Replies

7. UNIX for Dummies Questions & Answers

copy all files matching the request and change the extension at the same time

Hi everyone When I'm starting my script I'm giving to it two parameters: script.sh ext1 ext2 I need to copy all files in a directory fitting ext1, to the same folder, with the same names, but with the changed extension to ext2. Till now I've just managed to do it for only 1 file, but I... (16 Replies)
Discussion started by: vacuity93
16 Replies

8. Solaris

Permission of tmp file

The script written by csh, when it running it make some tmp file, the process need to read the tmp file to complete but tmp unable to open, don't have permission. Anyone know the way to automatic chmod the tmp file when run process. (2 Replies)
Discussion started by: Diabolist9
2 Replies

9. HP-UX

Core file under /tmp

Hi Guys Recently we have a issue where the core file under /tmp grows and there by /tmp becomes 100% full in our HP unix server. Any ideas or suggestions about how we can resolve this. (3 Replies)
Discussion started by: newtoaixos
3 Replies

10. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies
TYPES.DB(5)							     collectd							       TYPES.DB(5)

NAME
types.db - Data-set specifications for the system statistics collection daemon collectd SYNOPSIS
bitrate value:GAUGE:0:4294967295 counter value:COUNTER:U:U if_octets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 DESCRIPTION
The types.db file contains one line for each data-set specification. Each line consists of two fields delimited by spaces and/or horizontal tabs. The first field defines the name of the data-set, while the second field defines a list of data-source specifications, delimited by spaces and, optionally, a comma (",") right after each list-entry. The format of the data-source specification has been inspired by RRDtool's data-source specification. Each data-source is defined by a quadruple made up of the data-source name, type, minimal and maximal values, delimited by colons (":"): ds-name:ds-type:min:max. ds-type may be either ABSOLUTE, COUNTER, DERIVE, or GAUGE. min and max define the range of valid values for data stored for this data-source. If U is specified for either the min or max value, it will be set to unknown, meaning that no range checks will happen. See rrdcreate(1) for more details. FILES
The location of the types.db file is defined by the TypesDB configuration option (see collectd.conf(5)). It defaults to collectd's shared data directory, i. e. prefix/share/collectd/. CUSTOM TYPES
If you want to specify custom types, you should do so by specifying a custom file in addition to the default one (see FILES) above. You can do that by having multiple TypesDB statements in your configuration file or by specifying more than one file in one line. For example: TypesDB "/opt/collectd/share/collectd/types.db" TypesDB "/opt/collectd/etc/types.db.custom" Note: Make sure to make this file available on all systems if you're sending values over the network. SEE ALSO
collectd(1), collectd.conf(5), rrdcreate(1) AUTHOR
collectd has been written by Florian Forster <octo at verplant.org>. This manpage has been written by Sebastian Harl <sh at tokkee.org>. 5.1.0 2012-04-02 TYPES.DB(5)
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy