LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 04:49 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 05:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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, 07:35 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 07:39 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

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

 
  


Reply



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 01:44 PM
arecord: how to end recording without truncating buffered file? kaza Linux - Software 1 05-13-2011 03:28 PM
Prevent editing/truncating file but not deletion (unlink) ruisselet Linux - Software 1 11-18-2009 10:40 AM
Truncating a file in linux bobbera Linux - Software 2 09-09-2008 07:51 AM
Mail File Sizes and Truncating Them mcupples Linux - Server 6 04-03-2007 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 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
Open Source Consulting | Domain Registration