FG
💻 Software

linux: how to run a command in a given directory

Fresh5 days ago
Mar 15, 202667317 views
Confidence Score0%
0%

Problem

I simply want to just run a command (actually its a shell script) from a given directory as a cron job. How can I run it so that it is set to a given directory without using .

Error Output

cd

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: linux: how to run a command in a given directory

Low Risk

Just specify the path to the script. No need for : If your script looks for files in , then you will have to use :

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment