Sample Header Ad - 728x90

tar: could not chdir to 'dirname' when using -C with tar

1 vote
1 answer
11739 views
I downloaded [this file](https://github.com/psf/requests/tarball/main) and when I try to use -C with tar to change the name of the directory it outputs to, I get this error
$ tar -xvf requests.tar -C requests
tar: could not chdir to 'requests'
I don't get this error when extracting files without -C. I tried this in /tmp and ~/Desktop I also tried passing an absolute path.
Asked by user98513
Mar 26, 2022, 07:55 PM
Last activity: Mar 26, 2022, 08:08 PM