Sponsored Content
Top Forums Shell Programming and Scripting Checking existence of file using file pattern Post 302242220 by spkandy on Wednesday 1st of October 2008 12:15:43 PM
Old 10-01-2008
Thanks a lot ShawnMilo & Otheus...!

Smilie
Thanks a lot ShawnMilo & Otheus...!
Its working fine.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking file existence

Hi, My requirement was to check the existence of a file having a specified pattern.The way i tried to achieve this was if ; then echo "File found" fi an example file having this pattern was 'ilvs_trace01.0124'. it will vary... (3 Replies)
Discussion started by: DILEEP410
3 Replies

2. Shell Programming and Scripting

Checking the existence of a file..

Hi, I am trying to check for the existence of a file using the 'test' and the file existence options. When trying to check for a file with a space in between e.g 'Team List', it gives the following error. learn1: line 3: test: `Team: binary operator expected I am pasting my code below as... (7 Replies)
Discussion started by: igandu
7 Replies

3. Shell Programming and Scripting

Checking Multiple file existence

Hi, I want to check multiple files exist or not in a single if statement in korn Shell:confused:. Please help me Thanks (1 Reply)
Discussion started by: lathish
1 Replies

4. Shell Programming and Scripting

Multiple file existence and checking file size

I want to check the files in particular directory are more that 0 Bytes i.e, Non zero byte file. The script should print a msg if all the files in that directory are empty( 0 Byte). (2 Replies)
Discussion started by: lathish
2 Replies

5. Shell Programming and Scripting

Checking the existence of a file before getting last modified

Hi, I am trying to check the existence of a file, from a list of possible filenames: status-A status-B status-C before retrieving the last modified datetime using ls, I want to check it exists or ls will throw an error. So I have tried this: if ; then ls status-* fi But the if... (3 Replies)
Discussion started by: LostInTheWoods
3 Replies

6. Shell Programming and Scripting

checking the file existence using ssh

Hi Can any body say me the reason for below error ssh -o 'StrictHostKeyChecking no' user@client ' && print "1"' I am getting error as "Missing ]":wall: (6 Replies)
Discussion started by: ramesh12621
6 Replies

7. UNIX for Dummies Questions & Answers

Checking Existence and file size of File

Hi, I am a SAP- ABAP programer , i have only little knowledge of Unix. My issue is i have a list of files which are in internal table. I want to create a script which consist of all these files and in one go i can check in the unix server about there existance and there file size. Can... (2 Replies)
Discussion started by: amitkumar.b2
2 Replies

8. Shell Programming and Scripting

Checking existence of file using awk

Hi, I need to check whether a particular file exists ot not using awk. Can anyone help me please? For Example:script that i am using: awk '{filename =$NF; rc=(system("test -r filename")) print $rc;}' "$1" is not working. Here I am passing a text file as input whose last word contains a... (6 Replies)
Discussion started by: manish007
6 Replies

9. Shell Programming and Scripting

Checking file existence along with condition

Hi am trying to write a script which find the existence of a file from a find command output and perform a task if the file exists. Help me out with the correct syntax . Am trying with the following one but unable to get the output. if then <some tasks> else echo "file not exists" fi (5 Replies)
Discussion started by: rogerben
5 Replies

10. Shell Programming and Scripting

Checking for the file existence

Hi, I have written a script to validate the data file by referreing to the configurtion file. And moving the validated good records and bad records into HDFS. Suppose after 15 mins if i receive one more data fie,then after validation the good and bad records shold be stored in hadoop with the... (8 Replies)
Discussion started by: shree11
8 Replies
FS_CLEANACL(1)						       AFS Command Reference						    FS_CLEANACL(1)

NAME
fs_cleanacl - Remove obsolete entries from an ACL SYNOPSIS
fs cleanacl [-path <dir/file path>+] [-help] fs cl [-p <dir/file path>+] [-h] DESCRIPTION
The fs cleanacl command removes from the access control list (ACL) of each specified directory or file any entry that refers to a user or group that no longer has a Protection Database entry. Such an entry appears on the ACL as an AFS user ID number (UID) rather than a name, because without a Protection Database entry, the File Server cannot translate the UID into a name. Cleaning access control lists in this way not only keeps them from becoming crowded with irrelevant information, but also prevents the new possessor of a recycled AFS UID from obtaining access intended for the former possessor of the AFS UID. (Note that recycling UIDs is not recommended in any case.) OPTIONS
-path <dir/file path>+ Names each directory for which to clean the ACL (specifying a filename cleans its directory's ACL). If this argument is omitted, the current working directory's ACL is cleaned. Specify the read/write path to each directory, to avoid the failure that results from attempting to change a read-only volume. By convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for example, /afs/.abc.com). For further discussion of the concept of read/write and read-only paths through the filespace, see the fs mkmount reference page. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
If there are no obsolete entries on the ACL, the following message appears: Access list for <path> is fine. Otherwise, the output reports the resulting state of the ACL, following the header Access list for <path> is now At the same time, the following error message appears for each file in the cleaned directories: fs: '<filename>': Not a directory EXAMPLES
The following example illustrates the cleaning of the ACLs on the current working directory and two of its subdirectories. Only the second subdirectory had obsolete entries on it. % fs cleanacl -path . ./reports ./sources Access list for . is fine. Access list for ./reports is fine. Access list for ./sources is now Normal rights: system:authuser rl pat rlidwka PRIVILEGE REQUIRED
The issuer must have the "a" (administer) permission on each directory's ACL (or the ACL of each file's parent directory); the directory's owner and the members of the system:administrators group have the right implicitly, even if it does not appear on the ACL. SEE ALSO
fs_listacl(1), fs_mkmount(1) 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 FS_CLEANACL(1)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy