LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2014, 05:49 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
file size automatically truncating


In a perl script I am storing the output to a logfile with STDOUT and STDERR. But the file size automatically trucating when it reached 22Kb. I want it as 1MB. Is there any system variable which is controlling the size ?
 
Old 03-21-2014, 06:06 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
I do not think so (there is no such system variable). You can easily try to create files with perl or awk or whatever to check it.
 
Old 03-21-2014, 08:35 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by pan64 View Post
I do not think so (there is no such system variable). You can easily try to create files with perl or awk or whatever to check it.
I was using ">" instead of ">>" with STDOUT.
 
Old 03-21-2014, 08:39 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,836

Rep: Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360
Quote:
Originally Posted by divyashree View Post
I was using ">" instead of ">>" with STDOUT.
Completely understandable mistake. Happens all the time.

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Truncating an output file and overwriting its previous content moraxu Linux - Newbie 1 03-15-2013 02:44 PM
arecord: how to end recording without truncating buffered file? kaza Linux - Software 1 05-13-2011 04:28 PM
Prevent editing/truncating file but not deletion (unlink) ruisselet Linux - Software 1 11-18-2009 11:40 AM
Truncating a file in linux bobbera Linux - Software 2 09-09-2008 08:51 AM
Mail File Sizes and Truncating Them mcupples Linux - Server 6 04-03-2007 09:59 AM


All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration