Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:34:28+00:00 2026-05-29T09:34:28+00:00

I have java application which I am running on Unix from the command prompt.

  • 0

I have java application which I am running on Unix from the command prompt.
I am redirecting stdout and stderr to console.out and console.err files.
The file size is increasing because a lot of information is being logged.

I want to create a rolling file, when the file size increases above a particular size,
e.g console1.out should get created if console.out size exceeds 500KB.
Currently I am using

java MyAppName > logs/Console.out 2> logs/Console.err &

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:34:28+00:00Added an answer on May 29, 2026 at 9:34 am

    Pipe the result to split like this:

    java MyAppName | split -b500k - Console.log

    This will create a new file every time you go over 500k. See the man-page for split for more details and options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a java application which run as server running on a remote windows
I have an Java application running in JBoss in which I have enabled JMX
We have a rather large and complex application written in Java which is running
I have a java web application (running on JBoss), which need to authorizate users
Here's the scenario: I have a multi threaded java web application which is running
I have an application which has been running happily under Java 1.5 for around
I have no particular Java knowledge whatsoever. We are running an opensource application which
I have one java application which is running in my local machine . I
I have a Java application running in WebLogic 11g on Windows, which after several
I have a console Java application, which runs all the time on a remote

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.