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 6810649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:13:53+00:00 2026-05-26T20:13:53+00:00

How can I set the crontab to create, say for example, text files with

  • 0

How can I set the crontab to create, say for example, text files with dynamic file names? What I mean is, for instance, I will set the crontab that a text file will be created every minute in a directory. Then the filename that will be assigned to a text file will be depending on what time of the day it is.

Illustration:

0001.txt
0002.txt
0003.txt
0004.txt
…

and so on and so forth.

(Though the example above does not show text file names of the time of the day, you will get the point)

  • 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-26T20:13:53+00:00Added an answer on May 26, 2026 at 8:13 pm

    The date command can be used to get the current date and time in the format you want for the files.

    filename="`date +%Y-%m-%d_%H%M.txt`"
    echo "File created" > filename
    

    Will, right now for me, create a file named “2011-11-12_0905.txt”.

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

Sidebar

Related Questions

How I can set spinner empty by default? I mean that spinner doesn't have
How can I set up my crontab to execute X script at 11:59PM every
I can set the minimum version required (for example XP SP3) in Inno-Setup by
In Vim I can :set wrapscan so that when I do an incremental search,
I can set the background of each TabItem with TabItem.Background, but when that tab
I can set the ToolTip property of a ListView control, but that's for the
i need to set a crontab from a php script. i know that it
can i set a part of the text in a jList bold? in some
How can set top border to Android Text view using xml ? Please can
I can set a instance variable via a @property using: SEL s = NSSelectorFromString([NSString

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.