The following should do exactly the same thing without running into memory constraints as long as you don't start it in a directory where expanding $root_dir* overflows ARG_MAX limits:
PS With what you're doing here, I don't see any reason why changing find "$root_dir"* -type d ... in the above to just find "$root_dir" -type d ... would produce different results (and it avoid the possibility of an ARG_MAX limit error).
Last edited by Don Cragun; 08-11-2015 at 06:11 AM..
Reason: Add postscript.
This User Gave Thanks to Don Cragun For This Post:
Hi,
I have a cron job which executes daily once 9 PM.
The script is like
if
then
TYPE=OC
elif
then
TYPE=i
elif
then
TYPE=mmc
elif
then
TYPE=CB
elif
then
TYPE=oth
fi (1 Reply)
Hello, i am familiar enough with unix to do some damage but thats about it.
We have a set of RS/6000 43P Model 150's running AIX for our Catia V4 programmers.
back in the 90's a script was written to automate the conversion of files into machine code. that script has started giving us... (0 Replies)
How to allocate memory for a shell script on aix box at the time of execution i.e at runtime
Are there any commands for AIX in specific
Thanks in Advance (1 Reply)
Hi,
I am new to shell scripts may be the error is very very small and i am unable to catch hold of it, any suggestion would be appreciated....error is at the bottom:
+210 # get file type
+211 filetype=`tail -1 "$inputdir"/"$i"|cut -d"|" -f2`
+212 #
+213 # get the record count as specified... (4 Replies)
Hi All
I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error.
#!/bin/ksh
#-------------------------------------------------------------------------
# File: ang_stdnld.ksh
#
# Desc: UNIX shell script to extract Store information.... (3 Replies)
Hi guys,
I hope you can help me out with this one.
I am getting an error in AIX when running my KSH script 0403-029 There is not enough memory available now.
It is getting this error at the point where I have a PL/SQL Script executed. After executing, I wanted to put it in the log file.... (4 Replies)
In AIX 5.1, a daily run script that backing up oracle data failed yesterday with following errors:
The Tivoli backup of DBPROD failed.
What could be the issue, OS, backup or Oracle? (3 Replies)
Hi,
I run an awk script and I got the error attached below:
here are the lines that the compiler point to as an error:
duration = timeEnd1-timeBegin1;
print "Transmission: type of traffic " flow1 ;
print - Total transmitted bits = totalBits1 bits;
print - duration = ... (2 Replies)
Script:
#!/sbin/sh
echo "Welcome to my First Script"
echo "Enter a word"
read PASS
if then
echo "You are correct"
elif then
echo "Thats incorrect"
else
echo "Bye"
fi
When i run the script shell says:
Syntax error at line 7:'elif' is not expected
I ran through some old posts and... (3 Replies)
I am getting the error :
rocfm/wls_subload/in/processed_files/tel_input_additional_checked_all_mandatory.txt: 0403-057 Syntax error at
line 1 : `|' is not expected.
>>>>ALL MANDATORY FIELDS CHECKING IS SUCCESSFUL count is 0
... (3 Replies)
Discussion started by: princetd001
3 Replies
LEARN ABOUT DEBIAN
chi::driver::file
CHI::Driver::File(3pm) User Contributed Perl Documentation CHI::Driver::File(3pm)NAME
CHI::Driver::File - File-based cache using one file per entry in a multi-level directory structure
VERSION
version 0.54
SYNOPSIS
use CHI;
my $cache = CHI->new(
driver => 'File',
root_dir => '/path/to/cache/root',
depth => 3,
max_key_length => 64
);
DESCRIPTION
This cache driver stores data on the filesystem, so that it can be shared between processes on a single machine, or even on multiple
machines if using NFS.
Each item is stored in its own file. By default, during a set, a temporary file is created and then atomically renamed to the proper file.
While not the most efficient, it eliminates the need for locking (with multiple overlapping sets, the last one "wins") and makes this cache
usable in environments like NFS where locking might normally be undesirable.
By default, the base filename is the key itself, with unsafe characters escaped similar to URL escaping. If the escaped key is larger than
"max_key_length" (default 248 characters), it will be digested. You may want to lower "max_key_length" if you are storing a lot of items as
long filenames can be more expensive to work with.
The files are evenly distributed within a multi-level directory structure with a customizable "depth", to minimize the time needed to
search for a given entry.
CONSTRUCTOR OPTIONS
When using this driver, the following options can be passed to CHI->new() in addition to the CHI.
root_dir
The location in the filesystem that will hold the root of the cache. Defaults to a directory called 'chi-driver-file' under the OS
default temp directory (e.g. '/tmp' on UNIX). This directory will be created as needed on the first cache set.
depth
The number of subdirectories deep to place cache files. Defaults to 2. This should be large enough that no leaf directory has more than
a few hundred files. Each non-leaf directory contains up to 16 subdirectories (0-9, A-F).
dir_create_mode
Permissions mode to use when creating directories. Defaults to 0775.
file_create_mode
Permissions mode to use when creating files, modified by the current umask. Defaults to 0666.
file_extension
Extension to append to filename. Default is ".dat".
METHODS
path_to_key ( $key )
Returns the full path to the cache file representing $key, whether or not that entry exists. Returns the empty list if a valid path
cannot be computed, for example if the key is too long.
path_to_namespace
Returns the full path to the directory representing this cache's namespace, whether or not it has any entries.
TEMPORARY FILE RENAME
By default, during a set, a temporary file is created and then atomically renamed to the proper file. This eliminates the need for
locking. You can subclass and override method generate_temporary_filename to either change the path of the temporary filename, or skip the
temporary file and rename altogether by having it return undef.
SEE ALSO
CHI
AUTHOR
Jonathan Swartz <swartz@pobox.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-05-30 CHI::Driver::File(3pm)