Sponsored Content
Top Forums Shell Programming and Scripting Find: filename in every subdirectory matching a pattern Post 302937612 by Scrutinizer on Friday 6th of March 2015 01:33:17 PM
Old 03-06-2015
That just warns there should no slashes used with -name, because file names never contains slashes..
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to find file name for non matching pattern

Hi, I want to list only the file names which do not contain a specific keyword or search string. OS: Solaris Also is there any way ; through the same script I can save the output of search to a CSV (comma seperated) so that the file can be used for inventory purpose. Any assistance will... (5 Replies)
Discussion started by: sujoy101
5 Replies

2. Shell Programming and Scripting

find and replace in subdirectory (filename & content - both)

Hi, I have to rename all occurance of CUST_MST to RESELLER_MST both in filename and file content under a directory (say D0) which contains multiple (2-3 levels) sub directory. Example: D0 -> D1 -> D2 has a file CUST_MST_TEMP.txt this contains : > cat /D0/D1/D2/CUST_MST_TEMP.txt... (3 Replies)
Discussion started by: sabyasm
3 Replies

3. Shell Programming and Scripting

Filename and Pattern matching

Hiiiii every one, I am facing a problem while giving a file name which has space in it. The problem is ... I have to read a file where the set of input files are stored. Now getting that name I have to open the file and i have to extract the name of the user from where it is written like"by... (2 Replies)
Discussion started by: kheyali Mitra
2 Replies

4. UNIX for Dummies Questions & Answers

Find files matching a pattern

Hi, I am writing a BASH shell script. I would like to count all the files in the CURRENT directory matching a specific pattern. Could someone suggest the best/simplest way to do this. I have thought of these solutions (for simplicity the pattern is all files starting with A): ls -1 *A | wc -l... (5 Replies)
Discussion started by: msb65
5 Replies

5. UNIX for Dummies Questions & Answers

find files NOT matching name pattern

Hi, I have following files in my directory: /TESTDONTDEL> ls -alt total 14 drwxr-xr-x 2 oracle dba 1024 May 15 06:30 . -rw-r--r-- 1 oracle dba 40 May 15 06:30 exception.txt -rw-r--r-- 1 oracle dba 19 May 15 06:22 ful_1234_test1.txt -rw-r--r-- 1... (2 Replies)
Discussion started by: sagarparadkar
2 Replies

6. UNIX for Dummies Questions & Answers

Pattern matching and Printing Filename

Hi, My requirement is to search for a paritcular string from a group of .gz files and to print the lines containing that string and the name of the files in which that string is present. Daily 500 odd .gz files will be generated in a directory(directory name will be in the form of... (4 Replies)
Discussion started by: krao
4 Replies

7. UNIX for Dummies Questions & Answers

Help with filename pattern matching

Hi, I have files in a directory with filenames that match three specific patterns: 1) *'.L2_LAC'* 2) *'.L2_LAC_OC'* 3) *'.L2_LAC_SST'* I would like to have an "ls" command that will list only files matching the first two patterns. However, if I type: ls *'.L2_LAC'* I will get files that... (2 Replies)
Discussion started by: msb65
2 Replies

8. UNIX for Dummies Questions & Answers

FIND matching pattern of lines in a file

I need to search for two patterns in a file and find number of matching lines. find . -type f | xargs grep "DROP TABLE" | wc -l find . -type f | xargs grep "DROP SYNONYM" | wc -l The above code works. However I am looking at finding a commnd that will simplify as on a singe command... (2 Replies)
Discussion started by: Siva SQL
2 Replies

9. UNIX for Dummies Questions & Answers

find Search - Find files not matching a pattern

Hello all, this is my first and probably not my last question around here. I do hope you can help or at least point me in the right direction. My question is as follows, I need to find files and possible folders which are not owner = AAA group = BBB with a said location and all sub folders ... (7 Replies)
Discussion started by: kilobyter
7 Replies

10. UNIX for Dummies Questions & Answers

Find pattern suffix matching pattern

Hi, I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts. /tmp/1 IP=123.456.789.01 WAS_HOSTNAME=abcdefgh.was.tb.dsdc /tmp/hosts 123.456.789.01 I want this result in /tmp/hosts if hostname is already there dont want duplicate entry. ... (5 Replies)
Discussion started by: rajeshwebspere
5 Replies
BUTC_LOGS(5)							AFS File Reference						      BUTC_LOGS(5)

NAME
butc_logs - Message logs from the Tape Coordinator process DESCRIPTION
The Backup System Tape Coordinator (butc) process generates two log files per device, one for error messages and one for actions. Error Message Log The TE_device_name file logs error messages generated by the Backup System Tape Coordinator that controls the tape device or backup data file indicated by device_name. As the Tape Coordinator initializes, it creates the file in ASCII format in the /var/lib/openafs/backup directory. If there is an existing file, the Tape Coordinator renames it to TE_device_name.old>, overwriting the existing TE_device_name.old> file if it exists. For a tape device, the Tape Coordinator derives the variable device_name portion of the filename from the device pathname listed in the local /var/lib/openafs/backup/tapeconfig file, by stripping off the initial "/dev/" string and replacing any other slashes in the name with underscores. For example, the filename for a device called /dev/rmt/4m is TE_rmt_4m. Similarly, for a backup data file the Tape Coordinator strips off the initial slash ("/") and replaces any other slashes in the name with underscores. For example, the filename for a backup data file called /var/tmp/FILE is TE_var_tmp_FILE. The messages in the file describe the error and warning conditions the Tape Coordinator encounters as it operates. For instance, a message can list the volumes that are inaccessible during a dump operation, or warn that the Tape Coordinator is overwriting a tape or backup data file. The messages also appear in the /var/lib/openafs/backup/TL_device_name file, which traces most of the Tape Coordinator's actions. Action Log The TL_device_name file logs the actions performed by the Backup System Tape Coordinator that controls the tape device or backup data file indicated by device_name. It also records the same error and warning messages written to the TE_device_name file. As the Tape Coordinator initializes, it creates the file in ASCII format in the /var/lib/openafs/backup directory. If there is an existing file, the Tape Coordinator renames it to TL_device_name.old, overwriting the existing TL_device_name.old file if it exists. For a tape device, the Tape Coordinator derives the variable device_name portion of the filename from the device pathname listed in the local /var/lib/openafs/backup/tapeconfig file, by stripping off the initial "/dev/" string and replacing any other slashes in the name with underscores. For example, the filename for a device called /dev/rmt/4m is TL_rmt_4m. Similarly, for a backup data file the Tape Coordinator strips off the initial slash ("/") and replaces any other slashes in the name with underscores. For example, the filename for a backup data file called /var/tmp/FILE is TL_var_tmp_FILE. SEE ALSO
tapeconfig(5), butc(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BUTC_LOGS(5)
All times are GMT -4. The time now is 07:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy