FG
💻 Software

using xargs to cd to a directory

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

Problem

Feeling like an idiot right now. Why does this not work?

Error Output

echo "/some/directory/path" | xargs -n1 cd

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: using xargs to cd to a directory

Low Risk

The pipe runs xargs in a subprocess, and xargs runs cd in a subprocess. Changes in a subprocess do not get propagated to the parent process.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment