Bug 120847 - tar --no-recurse fails
tar --no-recurse fails
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tar (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-14 10:30 EDT by Thorsten Scherf
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-24 04:14:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thorsten Scherf 2004-04-14 10:30:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4.2)
Gecko/20040301

Description of problem:
The --no-recurse (formerly --no-recursion) option does not work as
expected. 
All Files and Sub-Directories are saved, they shouldn't.


Version-Release number of selected component (if applicable):
tar-1.3.25

How reproducible:
Always

Steps to Reproduce:
1.tar cvf --no-recurse etc_archiv.tar /etc
2.
3.
    

Actual Results:  all files and subdirectories are saved in the archive

Expected Results:  no subdirectories should be saved

Additional info:
Comment 1 Peter Vrabec 2004-10-08 09:01:08 EDT
I have a problem to reproduce bug# 120847, because it seems tar works
fine.

[peter@localhost peter]$ mkdir a
[peter@localhost peter]$ cd a
[peter@localhost a]$ mkdir a b c
[peter@localhost a]$ >file1
[peter@localhost a]$ cd a
[peter@localhost a]$ >file2
[peter@localhost a]$ cd ../b
[peter@localhost b]$ >file3
[peter@localhost b]$ cd ..
[peter@localhost a]$ tar -cvf test.tar --no-recursion *
a/
b/
c/
file1
[peter@localhost a]$ tar -tf test.tar
a/
b/
c/
file1
[peter@localhost a]$ tar --version
tar (GNU tar) 1.13.25
Copyright © 2001 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
Comment 2 Thorsten Scherf 2004-11-23 09:23:08 EST
try:
tar cvf test.tar --no-recursion a

it does not work.

"cd a; tar cvf test.tar --no-recursion *" works without problems.



 
Comment 3 Peter Vrabec 2004-11-24 04:14:33 EST
[peter@wrabco a]$ ls -R
.:
a  b  c  file1  tar  test.tar

./a:
file2  xyz

./a/xyz:
anotherFile

./b:
file3

./c:

[peter@wrabco a]$ ./tar cvf test.tar --no-recursion ./a/
./a/
[peter@wrabco a]$ ./tar cvf test.tar --no-recursion ./a/*
./a/file2
./a/xyz/
[peter@wrabco a]$ ./tar cvf test.tar ./a/
./a/
./a/xyz/
./a/xyz/anotherFile
./a/file2
[peter@wrabco a]$ ./tar cvf test.tar ./a/*
./a/file2
./a/xyz/
./a/xyz/anotherFile

i think it works fine

Note You need to log in before you can comment on or make changes to this bug.