Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Checking file sizes in script Post 302339266 by quintet on Thursday 30th of July 2009 06:54:01 AM
Old 07-30-2009
Code:
-f

    file is a regular file (not a directory or device file)
-s

    file is not zero size

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for file names/sizes

How can I look at a certain directory and list all the file names, locations and sizes of each file in the current directory and all subdirectories? (2 Replies)
Discussion started by: ssmiths001
2 Replies

2. Shell Programming and Scripting

Simple file checking script

Hi, I have a really, what I hope is, simple question. I'm looking for a simple way to see whether a file exists or not and then perform an action based on whether it exists or not. An example of what I tried is as follows: if then { echo "File mysql exists" ... (1 Reply)
Discussion started by: _Spare_Ribs_
1 Replies

3. Shell Programming and Scripting

Script to check and report database file sizes...

Need help for a script to check and report database file sizes. (2 Replies)
Discussion started by: marconi
2 Replies

4. Shell Programming and Scripting

Script for checking and reporting file sizes in a directory.

Hi, Need help for a Script for checking and reporting database file sizes in a directory. Request you to please give your valuable inputs. Thanks a lot in advance. Best Regards, Marconi (1 Reply)
Discussion started by: marconi
1 Replies

5. Programming

Checking columns in SQL, comparing user input and sizes.

I'm writing a KSH shell script that's using SQL though DB2. If I have a table defined and populated db2 "create table tb(num int,letter char(4))" db2 "insert into tb values(111,a) db2 "insert into tb values(112,b) db2 "insert into tb values(111,c) How can I check if a letter user... (0 Replies)
Discussion started by: busdude
0 Replies

6. Shell Programming and Scripting

Script check for file, alert if not there, and continue checking until file arrives

All, Is there a way to keep checking for a file over and over again in the same script for an interval of time? Ie If { mail -user continue checking until file arrives file arrives tasks exit I don't want the script to run each time and email the user each time a file... (4 Replies)
Discussion started by: markdjones82
4 Replies

7. Shell Programming and Scripting

Help with script checking for a file in various servers

I am trying to write a script that checks whether or not, a file exists on multiple servers. My code / logic so far is: #!/usr/bin/ksh print "Enter File name to be checked" read MYFILE ssh server1 " cd /var/opt/logs ; if then ... (4 Replies)
Discussion started by: momin
4 Replies

8. Shell Programming and Scripting

Script to compare file sizes

I need to write a bash script larger X Y that compares the sizes of two specified files X and Y, and reports which file is larger. For example, if X is larger, the output should be "File X is larger", while if Y is larger, the output should be "File Y is larger". If the files are exactly the... (3 Replies)
Discussion started by: julia_21436
3 Replies

9. UNIX for Dummies Questions & Answers

Checking for file Sizes

Hi , I have some 10 files where i need to check the size of each and every file...if the size of the file is 0...I shud send out an email mentioning which file is actually of 0KB size.. Pls help (13 Replies)
Discussion started by: saggiboy10
13 Replies

10. Shell Programming and Scripting

File checking script need help

Hi, Gurus, I need a scripts to check specified file if it exists or not at certain time (say every month between 5th and 7th). if file exists do something otherwise do another thing. can anybody help this? Thanks in advance :wall: (3 Replies)
Discussion started by: ken002
3 Replies
Locale::Codes::LangVar(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangVar(3pm)

NAME
Locale::Codes::LangVar - standard codes for language variation identification SYNOPSIS
use Locale::Codes::LangVar; $lvar = code2langvar('acm'); # $lvar gets 'Mesopotamian Arabic' $code = langvar2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langvar_codes(); @names = all_langvar_names(); DESCRIPTION
The "Locale::Codes::LangVar" module provides access to standard codes used for identifying language variations, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language variations. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lvar = code2langvar('en','alpha-2'); $lvar = code2langvar('en',LOCALE_CODE_ALPHA_2); The codesets currently supported are: alpha This is the set of alphanumeric codes from the IANA language registry, such as 'arevela' for Eastern Armenian. This code set is identified with the symbol "LOCALE_LANGVAR_ALPHA". This is the default code set. ROUTINES
code2langvar ( CODE [,CODESET] ) langvar2code ( NAME [,CODESET] ) langvar_code2code ( CODE ,CODESET ,CODESET2 ) all_langvar_codes ( [CODESET] ) all_langvar_names ( [CODESET] ) Locale::Codes::LangVar::rename_langvar ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangVar::add_langvar ( CODE ,NAME [,CODESET] ) Locale::Codes::LangVar::delete_langvar ( CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_alias ( NAME ,NEW_NAME ) Locale::Codes::LangVar::delete_langvar_alias ( NAME ) Locale::Codes::LangVar::rename_langvar_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::delete_langvar_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-01-06 Locale::Codes::LangVar(3pm)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy