Sponsored Content
Full Discussion: Shell script to find files
Top Forums Shell Programming and Scripting Shell script to find files Post 302330271 by welldone on Tuesday 30th of June 2009 05:07:13 PM
Old 06-30-2009
Shell script to find files

Hi Experts,
I am trying to write a shell script that should

1. Find files with name (ab030.txt,Ab030.TXT,AB030.TXT,ab030.TXT,AB030.txt)
2. If any of the above found, rename it to AB030.TXT


Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to find files

I have a directory which contains files with different kinds of extensions .everyday a file with .log gets added to it .i want to extract the file with .log extension which is created with todays date . thanks in advance (2 Replies)
Discussion started by: naren_samba2005
2 Replies

2. Filesystems, Disks and Memory

shell script to find zero byte files

I have a directory MYDIR In which i have several directories 1,2,3,4.... Now, In each of these directories i have several files a.dat, b.dat, c.dat, d.dat..... MYDIR ----1 ---------a.dat ---------b.dat ---------c.dat ---------d.dat ----2 ---------a.dat ---------b.dat ---------c.dat... (2 Replies)
Discussion started by: ramky79
2 Replies

3. UNIX for Dummies Questions & Answers

shell script to find files by date and size

Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory. I don't know how to implement this shell script using ''find''. appreciate any... (1 Reply)
Discussion started by: dadadc
1 Replies

4. Shell Programming and Scripting

Find and Replace in multiple files (Shell script)

hi guys, Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do it ??? jatin (13 Replies)
Discussion started by: jatins_s
13 Replies

5. Shell Programming and Scripting

deleting files inside shell script - ( using find)

Hi, I am using the command find /apps/qualdb/gpcn/scripts/cab_outbound/archive -name 'z*' -mtime +28 -exec rm {} \; in unix command prompt for deleting the files in my unix system under the specfied folder. It was succesfull. But when i running this command inside a shell script name... (2 Replies)
Discussion started by: Jayaram.Nambura
2 Replies

6. Shell Programming and Scripting

Shell Script - find, recursively, all files that are duplicated

Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name. For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
Discussion started by: KitFisto
5 Replies

7. Shell Programming and Scripting

Help me to find files in a shell script with any matching pattern

Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Discussion started by: hnux
3 Replies

8. Shell Programming and Scripting

Shell script to find files in dir and updation

Hi, I have the shell script requirement mentioned below : List all java and c files or all files in directory and sub directories' in folder structure in current dir. then search for pattren1 in all files globally and replace with other string . And also check the date... (3 Replies)
Discussion started by: ammulu
3 Replies

9. UNIX for Dummies Questions & Answers

Need a shell script to find 0 byte files in 5 servers

Hi..... Thanks for this wonderful forum.... My request: I have toatally 5 unix servers in which many applications are working I need to set a trap to identify 0 byte files if any are created proactively. For example: find /apps/fresco/ -mtime 1 -size 0c –print >>... (3 Replies)
Discussion started by: ChandruBala73
3 Replies

10. UNIX for Beginners Questions & Answers

Find and removing the old files and zipping the files using shell script

Hi, I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script. script was return as follows. find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
IPSEC_SHOWHOSTKEY(8)						  [FIXME: manual]					      IPSEC_SHOWHOSTKEY(8)

NAME
ipsec_showhostkey - show host's authentication key SYNOPSIS
ipsec showhostkey [--ipseckey [gateway]] [--left] [--right] [--dump] [--verbose] [--version] [--list] [--x509self] [--x509req] [--x509cert] [--txt gateway] [--dhclient] [--file secretfile] [--keynum count] [--id identity] DESCRIPTION
Showhostkey outputs (on standard output) a public key suitable for this host, in the format specified, using the host key information stored in /etc/ipsec.secrets. In general only the super-user can run this command, since only he can read ipsec.secrets. The --txt option causes the output to be in opportunistic-encryption DNS TXT record format, with the specified gateway value. If information about how the key was generated is available, that is provided as a DNS-file comment. For example, --txt 10.11.12.13 might give (with the key data trimmed for clarity): ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 IN TXT "X-IPsec-Server(10)=10.11.12.13 AQOF8tZ2...+buFuFn/" No name is supplied in the TXT record because there are too many possibilities, depending on how it will be used. If the text string is longer than 255 bytes, it is split up into multiple strings (matching the restrictions of the DNS TXT binary format). If any split is needed, the first split will be at the start of the key: this increases the chances that later hand editing will work. The --version option causes the version of the binary to be emitted, and nothing else. The --verbose may be present one or more times. Each occurance increases the verbosity level. The --left and --right options cause the output to be in ipsec.conf(5) format, as a leftrsasigkey or rightrsasigkey parameter respectively. Again, generation information is included if available. For example, --left might give (with the key data trimmed down for clarity): # RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 leftrsasigkey=0sAQOF8tZ2...+buFuFn/ The --dhclient option cause the output to be suitable for inclusion in dhclient.conf(5) as part of configuring WAVEsec. See <http://www.wavesec.org>. If --ipseckey is specified, the output format is the text form of a DNS IPSECKEY record (see RFC4025); the host name is the one included in the key information (or, if that is not available, the output of hostname --fqdn), with a . appended. The gateway information, if provided, is is included, otherwise, the gateway is assumed to be self, and to be of type FQDN. Generation information is included if available. For example (with the key data trimmed down for clarity): ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN IPSECKEYKEY floyd albert ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN KEY 0x4200 4 1 AQOF8tZ2...+buFuFn/ Normally, the default key for this host (the one with no host identities specified for it) is the one extracted. The --id option overrides this, causing extraction of the key labeled with the specified identity, if any. The specified identity must exactly match the identity in the file; in particular, the comparison is case-sensitive. There may also be multiple keys with the same identity. All keys are numbered based upon their linear sequence in the file (including all include directives) The --file option overrides the default for where the key information should be found, and takes it from the specified secretfile. DIAGNOSTICS
A complaint about "no pubkey line found" indicates that the host has a key but it was generated with an old version of FreeS/WAN and does not contain the information that showhostkey needs. FILES
/etc/ipsec.secrets SEE ALSO
ipsec.secrets(5), ipsec.conf(5), ipsec_rsasigkey(8) HISTORY
Written for the Linux FreeS/WAN project <http://www.freeswan.org> by Henry Spencer. BUGS
Arguably, rather than just reporting the no-IN-KEY-line-found problem, showhostkey should be smart enough to run the existing key through rsasigkey with the --oldkey option, to generate a suitable output line. The need to specify the gateway address (etc.) for --txt is annoying, but there is no good way to determine it automatically. There should be a way to specify the priority value for TXT records; currently it is hardwired to 10. The --id option assumes that the identity appears on the same line as the : RSA { that begins the key proper. [FIXME: source] 10/06/2010 IPSEC_SHOWHOSTKEY(8)
All times are GMT -4. The time now is 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy