tar: [filename] : Cannot stat: No such file or directory
Issue
- The following error is encountered when I run tar to create a compressed archive.
# ls /tmp/work
file_1 file_10 file_2 file_3 file_4 file_5 file_6 file_7 file_8 file_9
# tar czvf --warning=no-file-changed /tmp/file.tar.gz /tmp/work/*
tar: Removing leading `/' from member names
tar: /tmp/file.tar.gz: Cannot stat: No such file or directory
/tmp/work/file_1
/tmp/work/file_10
/tmp/work/file_2
/tmp/work/file_3
/tmp/work/file_4
/tmp/work/file_5
/tmp/work/file_6
/tmp/work/file_7
/tmp/work/file_8
/tmp/work/file_9
tar: Exiting with failure status due to previous errors
- What does this error mean? How do I prevent this error?
Environment
- Red Hat Enterprise Linux All
- tar
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
