07-04-2008
URGENT HELP NEEDED ON -File size reading
All Expert,
I am using Sun OS 5.8 and Perl version 5 in One server and Perl 5.8 in another unix server.
I am able to read a file using fopen function of perl --file size having more then 3 GB of data.(In the machine where Perl 5.8 install)
But when i am running the same perl script --It failed in other system saying Too large to open ?/
I doubt it is because of file size limitation on UNIX ,Can any body suggest how to read a file having more then 2 GB of data ??
Is there any SYSTEM variable i need to set ,to read this file ?
Is there any perl macro available which i can assign the value to over come this issue ?
In C #define _FILE_OFFSET_BITS 64 work fine to read a file size more then 2GB.
Please assit me it is URGENT.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok I admit it I am stumped and I would appreciate any and all help
Here is what I am trying to do.
Korn Shell script
I am setting a variable to another shell script that I want to invoke in my main script like so:
GETDIR=/vol100/cfg/.getdir
The .getdir shell script take a parameter,... (4 Replies)
Discussion started by: Batch
4 Replies
2. Shell Programming and Scripting
Hi,
I am new to shell scripting.
I have one .txt file whose name is status.txt
Now i want to read the contents of this file in a variable.
status.txt file contains the following input
1.xml
2.ps
3.pdf
now i want to read this status.txt file. Can anybody please help me to write a... (2 Replies)
Discussion started by: sunitachoudhury
2 Replies
3. UNIX for Dummies Questions & Answers
Hi
To delete some text in 2 files in line1 ( not complete line) in unix without opening the files.
For example: source file is like this
<?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies
4. UNIX for Advanced & Expert Users
--------------------------------------------------------------------------------
hy guys,
i got few interview questions i need someone to answer urgently:
1)If you cant get to the root, you try to fsck it, but gets errors to read file systems. What steps do you take to recover the host... (1 Reply)
Discussion started by: charneet
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need unix code to check the size of a file. for example if the size of the file in A folder is more than 1BM, then i have to move that particular file in to B folder whenever I run that particular script.
regards,
Srinivas. (7 Replies)
Discussion started by: vysrinivas
7 Replies
6. Shell Programming and Scripting
how can i split a file on last record ? say i have a file A with 4 records as follows :
first line
second line
third line
last line
I want to make two files B and C
with contents of B as
first line
second line
third line
and the contents of C as
last line (8 Replies)
Discussion started by: aliyesami
8 Replies
7. Shell Programming and Scripting
Hi,
I have a small grepping problem in my script.I am having a file from which i need to make sure "#^A17" is the last updation (Next # can be ignored) before ################.The idea behind this is, if this file contains "A17" as the last updation, i need to do a particular activity. please... (7 Replies)
Discussion started by: Renjesh
7 Replies
8. Shell Programming and Scripting
I am reading a pipe delimted file having the 4 columns. The file content looks like
APT|string|Application ID For App|value
for env in `cat $ConfigFile`
do
name=`echo $env | cut -d '|' -f1`
type=`echo $env | cut -d '|' -f2
prompt=`echo $env | cut -d '|' -f3`
... (5 Replies)
Discussion started by: chandu123
5 Replies
9. Programming
I need to copy a file (srcFile) to a new ubication (destFile). Then I calculate the size of the copy file using stat. The problem is that I always get a cero size value although the file has not cero size in the hard disk.
The source code that does this is :
PROGRAM 1:
char srcFile;... (4 Replies)
Discussion started by: clxspain
4 Replies
10. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
LEARN ABOUT DEBIAN
catalyst::restarter
Catalyst::Restarter(3pm) User Contributed Perl Documentation Catalyst::Restarter(3pm)
NAME
Catalyst::Restarter - Uses File::ChangeNotify to check for changed files and restart the server
SYNOPSIS
my $class = Catalyst::Restarter->pick_subclass;
my $restarter = $class->new(
directories => '/path/to/MyApp',
regex => '.yml$|.yaml$|.conf|.pm$',
start_sub => sub { ... }
);
$restarter->run_and_watch;
DESCRIPTION
This is the base class for all restarters, and it also provide functionality for picking an appropriate restarter subclass for a given
platform.
This class uses File::ChangeNotify to watch one or more directories of files and restart the Catalyst server when any of those files
changes.
METHODS
pick_subclass
Returns the name of an appropriate subclass for the given platform.
new ( start_sub => sub { ... }, ... )
This method creates a new restarter object, but should be called on a subclass, not this class.
The "start_sub" argument is required. This is a subroutine reference that can be used to start the Catalyst server.
run_and_watch
This method forks, starts the server in a child process, and then watched for changed files in the parent. When files change, it kills the
child, forks again, and starts a new server.
SEE ALSO
Catalyst, File::ChangeNotify
AUTHORS
Catalyst Contributors, see Catalyst.pm
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-19 Catalyst::Restarter(3pm)