Sponsored Content
Top Forums Shell Programming and Scripting Check for file with a particular extension in a particular directory Post 302903803 by Bhavesh Sharma on Thursday 29th of May 2014 04:52:03 PM
Old 05-29-2014
Check for file with a particular extension in a particular directory

Hi,
I have a directory which I am passing in my script as a parameter. Parameter name has been set to $TCH_FILE_DIRECTORY.
I want to know if there's atleast 1 (or more) files in this directory with the extension '.tch'. How can I find this using ksh.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to check if directory/file exist using c/c++

Hi there,, how to check if directory/file exist using c/c++ under unix/linux? I can use access() under Window MFC. Thanks. Steven (1 Reply)
Discussion started by: steven88
1 Replies

2. Programming

how to check if directory/file exist using c/c++

Hi there, how to check if directory/file exist using c/c++ under linux/unix. Thanks. Steven (2 Replies)
Discussion started by: steven88
2 Replies

3. Shell Programming and Scripting

Check file extension

Hi , I am FTPing the file. Once the file is FTPied I need to check whether that file currently transferred is of .xls and I need to convert the same to a flat file. What command to use to find the extension of the file?. Thanks Mahalakshmi.A (6 Replies)
Discussion started by: mahalakshmi
6 Replies

4. Shell Programming and Scripting

How do i check whether a file has extension?

Hi, How do i check whether a file has extension? I need to code a script that will check whether a file has extension or not. Say a file Rpt200 If the file doesn't have an extenion, I need to rename the file with .txt extension. For example Rpt200 will become Rpt200.txt Please advice. ... (2 Replies)
Discussion started by: sunday8
2 Replies

5. Shell Programming and Scripting

How to check that passed parameters all have the same extension?

$ ls monkey.txt banana.csv tree.txt $ myscript monkey.txt tree.txt All extensions ARE alike. $ myscript *txt All extensions ARE alike. $ myscript monkey.txt banana.csv All extensions are NOT alike. $ myscript * All extensions are NOT alike. My brain has given up; what's the simplest... (11 Replies)
Discussion started by: cs03dmj
11 Replies

6. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

7. Shell Programming and Scripting

check if a given string is a file or directory

hi i want to know how to do this if the given is /tmp/ and it is a valid directory then it will echo directory if the given is /tmp/file.txt and is a valid file then it will echo file.. thanks! (5 Replies)
Discussion started by: h0ujun
5 Replies

8. Shell Programming and Scripting

How to check if something is a file, directory or other?

I want to know how you would go about checking if something is either a file or a directory. mostly for argument validation stuff. I know -d is to see if its a directory but im guessing -f is for files?? (1 Reply)
Discussion started by: Waffles
1 Replies

9. Shell Programming and Scripting

Rename specific file extension in directory with match to another file in bash

I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies

10. UNIX for Beginners Questions & Answers

Find file with extension and excluding directory

Hi, I have an inquiry on how do I use the find command in Solaris Unix to find some file ends with extension : txt, err in the root directory with modified date of 30days and this find command will also need to exclude b directory and its subdirectory. All the files from the above find criteria... (5 Replies)
Discussion started by: snowfrost88
5 Replies
KUMO-SERVER(1)						      General Commands Manual						    KUMO-SERVER(1)

NAME
kumo-server - kumofs server daemon SYNOPSIS
kumo-server -m <addr[:port=19700]> -p <addr[:port19700]> -l <addr[:port=19800]> -s <path.tch> DESCRIPTION
kumo-server stores actual data. You can add kumo-servers after buiding the cluster. You can get live status of the kumo-manager using kumostat and kumotop command. OPTIONS
-l <addr[:port=19800]> --listen listen address -L <port=19900> --stream-listen listen port for replacing stream -f <dir=/tmp> --offer-tmp path to temporary directory for replacing -s <path.tch> --store path to database -m <addr[:port=19700]> --manager1 address of manager 1 -p <addr[:port=19700]> --manager2 address of manager 2 -S <number=20> --replicate-set-retry replicate set retry limit -D <number=20> --replicate-delete-retry replicate delete retry limit -gN <seconds=60> --garbage-min-time minimum time to maintenance deleted key -gX <seconds=3600> --garbage-max-time maximum time to maintenance deleted key -gS <kilobytes=2048> --garbage-mem-limit maximum memory usage to memory deleted key -k <number=2> --keepalive-interval keepalive interval in seconds -Ys <number=1> --connect-timeout connect timeout time in seconds -Yn <number=4> --connect-retry-limit connect retry limit -Ci <number=8> --clock-interval clock interval in seconds -TW <number=2> --write-threads number of threads for asynchronous writing -TR <number=4> --read-threads number of threads for asynchronous reading -o <path.log> --log output logs to the file -g <path.mpac> --binary-log enable binary log -v --verbose -d <path.pid> --daemon EXAMPLE
[on svr1 ]$ kumo-server -v -l svr1 -m mgr1 -p mgr2 -s /var/kumodb.tch -gN 5 -gS 20480 [on svr2 ]$ kumo-server -v -l svr2 -m mgr1 -p mgr2 -s /var/kumodb.tch -TR 6 -TW 4 [on svr3 ]$ kumo-server -v -l svr3 -m mgr1 -p mgr2 -s /var/kumodb.tch -Ci 16 [localhost]$ kumo-server -v -m localhost -l localhost:19801 -L 19901 -s ./database1.tch [localhost]$ kumo-server -v -m localhost -l localhost:19802 -L 19902 -s ./database2.tch [localhost]$ kumo-server -v -m localhost -l localhost:19803 -L 19902 -s ./database3.tch SEE ALSO
kumostat(1), kumotop(1), kumolog(1), kumomergedb(1), kumohash(1). kumo-server July 2009 KUMO-SERVER(1)
All times are GMT -4. The time now is 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy