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

  • Home
  • SEARCH
  • 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 6753921
In Process

The Archive Base Latest Questions

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

On a Linux system I have a binary (bin.exe) which needs to read an

  • 0

On a Linux system I have a binary (bin.exe) which needs to read an input file (input.cfg), where the names of other data files (data.txt) are specified. Usually both binary, input file and data files were in the same directory. Now and for organization reasons I need binary file to be in $SOMEPATH/bin and input and data files in $SOMEPATH/input.

I do not know how to do this. If I try

$SOMEPATH/bin/bin.exe $SOMEPATH/input/input.cfg

I get

error, "data.txt" not found

One solution would be to include absolute of relative path of “data.txt” in input.cfg, but the binary does not accept this.

I thought about somehow fooling the binary so that it thinks it is in $SOMEPATH/input, so that I just do

$SOMEPATH/bin/bin.exe input.cfg

and it works, but I do not know whether this is possible. any hints?

  • 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-26T13:13:09+00:00Added an answer on May 26, 2026 at 1:13 pm

    (cd $SOMEPATH/input && $SOMEPATH/bin/bin.exe input.cfg)

    This is assuming that the program is relying on the current working directory to find the files. If the program is trying hard to find them in the same location as the executable, by consulting /proc/<pid>/exe for example, then you may be out of luck.

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

Sidebar

Related Questions

I have this binary file on my Linux system... udit@udit-Dabba ~ $ cat file.enc
I have a set of Berkeley DB files on my Linux file system that
I have written a Linux system wide C++ program /usr/bin/PROG_X that uses a configuration
On a Linux system, I have a very large text file and I need
Hi I noticed that in the Linux file system we have 4 folders Libraries
So I have the following code, which allocates memory using the mmap linux system
So I have a daemon running on a Linux system, and I want to
I have two Slackware Linux systems on which the POSIX semaphore sem_open() call fails
Python for Unix and Linux System Administration is aimed at sysadmins. Any other favorites
I have the following gifs on my linux system: $ find . -name *.gif

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.