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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:31:39+00:00 2026-05-20T08:31:39+00:00

I have 20 machines, each running a process. The machines are named: [machine1, machine2,

  • 0

I have 20 machines, each running a process. The machines are named:

[“machine1”, “machine2”, …., “machine20”]

To inspect how the process is doing on machine1, I issue the following command from a remote machine:

ssh machine1 cat log.txt

For machine2, I issue the following command:

ssh machine2 cat log.txt

Similarly, for machine20, I issue the following command:

ssh machine20 cat log.txt

Is there a bash command that will allow me to view the output from all machines using one command?

  • 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-20T08:31:40+00:00Added an answer on May 20, 2026 at 8:31 am

    If the machines are nicely numbered like in your example:

    for i in {1..20} ; do ssh machine$i cat log.txt; done
    

    If you have the list of machines in a file, you can use:

    cat machinesList.txt | xargs -i ssh {} cat log.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 machines both running one process each. shell process on Machine A
This is an interview question. I have K machines each of which is connected
I have 2 machines running same workers. One machine shoud be primary as it
I have two machines, one running 2.4.18 and one running 2.4.20. Both run Java
I have a fairly simple process running that periodically pulls RSS feeds and updates
I have the same server side application running on multiple machines. I would like
All, I'm looking for advice over the following scenario: I have a component running
I have a network of 100 machines, all running Ubuntu Linux. On a continuous
I have a existing project (non-web), with multiple components/programs running on different machines. The
I have a long running process that I suspect has a memory leak. I

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.