The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Where is the Security in Depth? iBot IT Security RSS 0 01-20-2009 05:00 PM
How to print lines till till a pattern is matched in loop anoopvraj Shell Programming and Scripting 3 10-30-2008 10:36 PM
find depth using ftw germallon High Level Programming 2 06-17-2008 10:58 AM
mq queue depth Satyak Shell Programming and Scripting 0 02-13-2008 05:28 AM
Moving files till the size is less than 200000. rooh UNIX for Dummies Questions & Answers 1 04-06-2002 02:23 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 6 Days Ago
vijays3 vijays3 is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
Smile Want to zip the all files till nth depth

All,

i need a script which can zip the all files which are in directories and its subdirectories

for example:

dir1 contains file1,file2,dir1a,dir1b
now dir1a also contains fil11,fil12 ,dirab

so script should look for files in dir or sub dir till files not found and zip the all
files.
  #2 (permalink)  
Old 6 Days Ago
jsmithstl jsmithstl is offline
Registered User
  
 

Join Date: Oct 2009
Location: St. Louis, MO
Posts: 34
This works for me.

Code:
zip -r myzip /tst
  adding: /tst/ (stored 0%)
  adding: /tst/dir1/ (stored 0%)
  adding: /tst/dir1/dir2/ (stored 0%)
  adding: /tst/dir1/dir2/dir3/ (stored 0%)
  adding: /tst/dir1/dir2/dir3/dir4/ (stored 0%)
  adding: /tst/dir1/dir2/dir3/dir4/mhfile4 (stored 0%)
  adding: /tst/dir1/dir2/dir3/myfile3 (stored 0%)
  adding: /tst/dir1/dir2/myfile2 (stored 0%)
  adding: /tst/dir1/myfile1 (stored 0%)
  adding: /tst/myfile (stored 0%)

Last edited by jsmithstl; 6 Days Ago at 01:49 AM..
  #3 (permalink)  
Old 6 Days Ago
vijays3 vijays3 is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
Thank you very much it is working for me.....
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0