Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Delete the file which crossed 2GB Post 302855591 by alister on Friday 20th of September 2013 11:00:13 AM
Old 09-20-2013
Quote:
Originally Posted by Rahulne25
Thanks, its working fine in RHEL,but i am getting an error in solaris10 server when i execute that script....
Simply saying "an error" is absolutely useless feedback. At the very least, copy/paste any error messages. If there are none, then describe the error in detail.

I suspect the error is caused by not having stat or having a stat implementation that implements a different command line option syntax.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File size exceeding 2GB

I am working on HP-Unix. I have a 600 MB file in compressed form. During decompression, when file size reaches 2GB, decompression aborts. What should be done? (3 Replies)
Discussion started by: Nadeem Mistry
3 Replies

2. Programming

C++ Problem, managing >2Gb file

My C++ program returns 'Disk Full' Message when I tried to manage a file larger than 2Gb. the process is very simple: based on a TXT file, the process combine the information generating another temporary file (generating the error) to fillup a database. My FS, during the process, reaches 40%...... (4 Replies)
Discussion started by: ASOliveira
4 Replies

3. Shell Programming and Scripting

efficiently split a 2GB text file into two

Can an expert kindly write an efficient Linux ksh script that will split a large 2 GB text file into two? Here is a couple of sample record from that text file: "field1","field2","field3",11,22,33,44 "TG","field2b","field3b",1,2,3,4 The above rows are delimited by commas. This script is to... (2 Replies)
Discussion started by: ihot
2 Replies

4. UNIX for Dummies Questions & Answers

How to find filesystems crossed 90% capacity

Hi experts, How do i find which are the filesystems which has crossed 90% capacity in solaris box. thanks Shaan:) (4 Replies)
Discussion started by: shaan_dmp
4 Replies

5. UNIX for Dummies Questions & Answers

MAX file size limited to 2GB

Hi All, We are running HP rp7400 box with hpux 11iv1. Recently, we changed 3 kernel parameters a) msgseg from 32560 to 32767 b) msgmnb from 65536 to 65535 c) msgssz from 128 to 256 Then we noticed that all application debug file size increase upto 2GB then it stops. So far we did not... (1 Reply)
Discussion started by: mhbd
1 Replies

6. AIX

Creating > 2GB file

I am trying to execute a database dump to a file, but can't seem to get around the 2GB file size. I have tried setting the user limit to -1, but no luck. (4 Replies)
Discussion started by: markper
4 Replies

7. Programming

Can't create file bigger than 2GB with my application

Hi, I've created a simple application that is supposed to fill up a file with messages up to the size I pass as parameter. The problem is that once the file reaches the 2GB size, it stops growing. The flow of the application, for what is worth, is as follows: while ( bytes written <... (7 Replies)
Discussion started by: emitrax
7 Replies

8. Linux

unzipping file > 2gb

I am not able to unzip file greater then 2gb, Any suggestions how to do that in linux? Regards, Manoj (5 Replies)
Discussion started by: manoj.solaris
5 Replies

9. UNIX for Advanced & Expert Users

How to create a file more than 2GB

Hi, I am executing a SQL query and the output is more than 2GB. Hence the process is failing. How can I have a file created more than 2GB ? Thanks, Risshanth (1 Reply)
Discussion started by: risshanth
1 Replies

10. HP-UX

2GB file size limit

Greetings, I'm attempting to dump a filesystem from a RHEL5 Linux server to a VXFS filesystem on an HP-UX server. The VXFS filesystem is large file enabled and I've confirmed that I can copy/scp a file >2GB to the filesystem. # fsadm -F vxfs /os_dumps largefiles # mkfs -F vxfs -m... (12 Replies)
Discussion started by: bkimura
12 Replies
explain_stat(3) 					     Library Functions Manual						   explain_stat(3)

NAME
explain_stat - explain stat(2) errors SYNOPSIS
#include <libexplain/stat.h> const char *explain_stat(const char *pathname, const struct stat *buf); void explain_message_stat(char *message, int message_size, const char *pathname, const struct stat *buf); const char *explain_errno_stat(int errnum, const char *pathname, const struct stat *buf); void explain_message_errno_stat(char *message, int message_size, int errnum, const char *pathname, const struct stat *buf); DESCRIPTION
These functions may be used to obtain explanations for stat(2) errors . explain_errno_stat const char *explain_errno_stat(int errnum, const char *pathname, const struct stat *buf); The explain_errno_stat function is used to obtain an explanation of an error returned by the stat(2) function. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (stat(pathname, &buf) < 0) { int err = errno; fprintf(stderr, "%s ", explain_errno_stat(err, pathname, &buf)); exit(EXIT_FAILURE); } errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the stat(2) system call. buf The original buf, exactly as passed to the stat(2) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_errno_stat void explain_message_errno_stat(char *message, int message_size, int errnum, const char *pathname, const struct stat *buf); The explain_message_errno_stat function is used to obtain an explanation of an error returned by the stat(2) function. The least the mes- sage will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (stat(pathname, &buf) < 0) { int err = errno; char message[3000]; explain_message_errno_stat(message, sizeof(message), err, pathname, &buf); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the stat(2) system call. buf The original buf, exactly as passed to the stat(2) system call. explain_message_stat void explain_message_stat(char *message, int message_size, const char *pathname, const struct stat *buf); The explain_message_stat function is used to obtain an explanation of an error returned by the stat(2) function. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (stat(pathname, &buf) < 0) { char message[3000]; explain_message_stat(message, sizeof(message), pathname, &buf); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. pathname The original pathname, exactly as passed to the stat(2) system call. buf The original buf, exactly as passed to the stat(2) system call. explain_stat const char *explain_stat(const char *pathname, const struct stat * buf); The explain_stat function is used to obtain an explanation of an error returned by the stat(2) function. The least the message will con- tain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (stat(pathname, &buf) < 0) { fprintf(stderr, "%s ", explain_stat(pathname, &buf)); exit(EXIT_FAILURE); } pathname The original pathname, exactly as passed to the stat(2) system call. buf The original buf, exactly as passed to the stat(2) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller AUTHOR
Written by Peter Miller <pmiller@opensource.org.au> explain_stat(3)
All times are GMT -4. The time now is 11:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy