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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:24:33+00:00 2026-06-15T20:24:33+00:00

Possible Duplicate: In the bash shell, what is 2>&1 ? I recently saw this

  • 0

Possible Duplicate:
In the bash shell, what is “ 2>&1 ”?

I recently saw this in a crontab:

5 * * * * perl /abs/path/to/my/script.pl >> /abs/path/two/my/script-log.txt 2>&1

If I’m reading this correctly, it runs script.pl every hour, 5 minutes after the hour (so 2:05, 3:05, 10:05, etc.). Again, if I’m correct, it is redirecting standard output to a log file located elsewhere.

But what is this Linux/Perl voo-doo at the end of the crontab?

2>&1

What is this instructing Linux/Perl to do? And if my above interpretation of the crontab is incorrect, please clarify for me as well! Thanks in advance!

  • 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-06-15T20:24:34+00:00Added an answer on June 15, 2026 at 8:24 pm

    Redirect file descriptor 2 (stderr) over 1; it’s the idiomatic way to tell /bin/sh that stderr should go in the same place as stdout

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

Sidebar

Related Questions

Possible Duplicate: Automatic exit from bash shell script on error How can I have
Possible Duplicate: Using getopts in bash shell script to get long and short command
Possible Duplicate: Split string based on delimiter in bash? i have a shell script
Possible Duplicate: In the bash shell, what is “ 2>&1 ”? #echo [+] Creating
Possible Duplicate: Problem executing bash file I have created a bash file script and
Possible Duplicate: Shell script to append text to each file? How to append output
Possible Duplicate: Bash: Detect if user's path has a specific directory in it Given
Possible Duplicate: How to execute Mysql command from a shell script? I'm trying to
Possible Duplicate: Quick-and-dirty way to ensure only one instance of a shell script is
Possible Duplicate: grep loses coloring when run from bash script I have a simple

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.