Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
7z NICHT rekursiv nutzen?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
BlackEye
l33t
l33t


Joined: 04 Dec 2002
Posts: 756
Location: Germany

PostPosted: Thu Apr 05, 2012 12:08 pm    Post subject: 7z NICHT rekursiv nutzen? Reply with quote

Hallo Leute,

eigentlich steht doch der Schalter -r für Rekursion. Also lasse ich ihne weg, sollte Rekursion abgeschaltet sein (genau das möchte ich). Doch egal wie und was ich angebe (-r, -r- oder -r0), er packt jedes mal rekursiv. Ist das ein Bug oder bin ich nur zu blöd das Ding zu benutzen? :-)

Code:
$ 7z a test.7z

7-Zip [64] 9.13 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-04-15
p7zip Version 9.13 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Scanning

Creating archive test.7z


Everything is Ok
(~/test/7ztest) $ 7z l test.7z

7-Zip [64] 9.13 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-04-15
p7zip Version 9.13 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Listing archive: test.7z

--
Path = test.7z
Type = 7z
Solid = -
Blocks = 0
Physical Size = 142
Headers Size = 142

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2012-04-05 14:02:46 ....A            0            0  file1
2012-04-05 14:02:55 ....A            0            0  folder/file2
2012-04-05 14:02:55 D....            0            0  folder
------------------- ----- ------------ ------------  ------------------------
                                     0            0  2 files, 1 folders
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Fri Apr 06, 2012 6:32 pm    Post subject: Reply with quote

Die Man-Page sagt:

-r[-|0]
Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it)

Der "does not do what you think" sagt in dem Falle doch eigentlich schon alles ^^.
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
BlackEye
l33t
l33t


Joined: 04 Dec 2002
Posts: 756
Location: Germany

PostPosted: Sat Apr 07, 2012 5:11 pm    Post subject: Reply with quote

lol - klasse. Damit bin ich nicht in der Lage einfach nur mal ein Verzeichnis ohne seine Unterverzeichnisse einzupacken - blöd :-)
Back to top
View user's profile Send private message
Knieper
l33t
l33t


Joined: 10 Nov 2005
Posts: 846

PostPosted: Tue Apr 10, 2012 8:40 am    Post subject: Reply with quote

Sind es so viele Dateien, dass die Argumente überlaufen? "*(.)" listet unter zsh nur die regulären Dateien auf und damit funktioniert:
Code:

>ls *
a  b

1:
a  b

2:
a  b
>7z a foo.7z *(.)

7-Zip 9.13 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-04-15
p7zip Version 9.13 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
Scanning

Creating archive foo.7z


Everything is Ok
>7z l foo.7z

7-Zip 9.13 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-04-15
p7zip Version 9.13 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,1 CPU)

Listing archive: foo.7z

--
Path = foo.7z
Type = 7z
Solid = -
Blocks = 0
Physical Size = 116
Headers Size = 116

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2012-04-10 10:19:42 ....A            0            0  a
2012-04-10 10:19:46 ....A            0            0  b
------------------- ----- ------------ ------------  ------------------------
                                     0            0  2 files, 0 folders


_________________
Je dümmer desto Gnome/KDE.
Back to top
View user's profile Send private message
BlackEye
l33t
l33t


Joined: 04 Dec 2002
Posts: 756
Location: Germany

PostPosted: Tue Apr 10, 2012 8:56 am    Post subject: Reply with quote

Hm, bin ich überfragt. Wie viele Argumente gehen denn? Vermutlich 65k oder? Also hier liegen nur knapp 1900 Datei im Verzeichnis. Damit wäre das wohl möglich. Versuche ich beim nächsten mal - danke für den Tipp!

Edit: Da ich die bash und nicht zsh nutze, müsste dieses Kommando auch funktionieren:
Code:
find . -maxdepth 1 -type f | xargs 7z a foo.7z
Back to top
View user's profile Send private message
Knieper
l33t
l33t


Joined: 10 Nov 2005
Posts: 846

PostPosted: Tue Apr 10, 2012 9:07 am    Post subject: Reply with quote

Eher weniger, hängt von Architektur, System, Shell, 7z ab. Du kannst immernoch ein find drumbasteln oder nach Namen (a*,...) einschränken...
_________________
Je dümmer desto Gnome/KDE.
Back to top
View user's profile Send private message
BlackEye
l33t
l33t


Joined: 04 Dec 2002
Posts: 756
Location: Germany

PostPosted: Tue Apr 10, 2012 9:15 am    Post subject: Reply with quote

Ach mist - gerade fällt mir ein dass ich das ganze ja unter Windows beim Kunden nutzen wollte - damit entfällt das alles :)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Thu Apr 12, 2012 4:23 pm    Post subject: Reply with quote

BlackEye wrote:
Edit: Da ich die bash und nicht zsh nutze, müsste dieses Kommando auch funktionieren:
Code:
find . -maxdepth 1 -type f | xargs 7z a foo.7z
Hhm, inwiefern macht denn die Shell in diesem Fall für einen Unterschied ?
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Sun Apr 15, 2012 3:25 pm    Post subject: Reply with quote

toralf wrote:
BlackEye wrote:
Edit: Da ich die bash und nicht zsh nutze, müsste dieses Kommando auch funktionieren:
Code:
find . -maxdepth 1 -type f | xargs 7z a foo.7z
Hhm, inwiefern macht denn die Shell in diesem Fall für einen Unterschied ?


bash: "ls *(.)" --> Syntaxfehler
zsh: "ls *(.)" --> listet alle Dateien (und keine Verzeichnisse) im aktuellen Verzeichnis
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum