Zipping files | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Zipping files

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-04-2012
saggiboy10 saggiboy10 is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 21 October 2014, 8:16 AM EDT
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Zipping files

Hi All,

I have a scenario where in am using uuencode to send a txt file as an excel to end users( email attachment).I have 7 different files and these files are sent as emails 7 times...


So my question is, can i not zip all the 7 files at once and attach those files in a single email????

Thanks
Sponsored Links
    #2  
Old 12-04-2012
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 22 October 2014, 8:12 PM EDT
Location: Galactic Empire
Posts: 3,387
Thanks: 235
Thanked 1,209 Times in 1,135 Posts
Yes, you can:-

Code:
find . -name "*.txt" -print | zip att -@


Code:
uuencode att.zip att.zip | mailx -s "Att" user@domain.com

Sponsored Links
    #3  
Old 12-04-2012
saggiboy10 saggiboy10 is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 21 October 2014, 8:16 AM EDT
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the prompt reply...can u let me know why did you mention att.zip twice in the below code mentioned..

Code:
uuencode att.zip att.zip | mailx -s "Att" user@domain.com

---------- Post updated at 03:53 PM ---------- Previous update was at 03:53 PM ----------

are they 2 different files??????
    #4  
Old 12-04-2012
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 22 October 2014, 8:12 PM EDT
Location: Galactic Empire
Posts: 3,387
Thanks: 235
Thanked 1,209 Times in 1,135 Posts
No, they are not different files. Below is the syntax of uuencode

Code:
uuencode <source file> <output file>

source file is the file to be encoded & output file is the encoded file. They can be the same name.
Sponsored Links
    #5  
Old 12-04-2012
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 24 October 2014, 11:36 AM EDT
Location: Saskatchewan
Posts: 19,682
Thanks: 823
Thanked 3,352 Times in 3,139 Posts
In other words, 'output file' is the filename that the email gets told to use, which needn't have anything to do with the input name.
Sponsored Links
    #6  
Old 12-05-2012
saggiboy10 saggiboy10 is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 21 October 2014, 8:16 AM EDT
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Cool...Thanks...

---------- Post updated 12-05-12 at 04:19 AM ---------- Previous update was 12-04-12 at 04:12 PM ----------

using

Code:
find . -name "*.txt" -print | zip att -@

It is zipping all files in the directory, I have only a specific files to be zipped..Tried a few options but it dint work though..pls help
Sponsored Links
    #7  
Old 12-05-2012
./hari.sh's Avatar
./hari.sh ./hari.sh is offline
Registered User
 
Join Date: Jul 2007
Last Activity: 17 January 2014, 5:27 AM EST
Posts: 97
Thanks: 6
Thanked 4 Times in 4 Posts
use the file name instead of find command

echo yourfile.txt | zip att -@
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with zipping files angshuman Shell Programming and Scripting 6 03-01-2011 10:32 AM
zipping files swathich Shell Programming and Scripting 3 11-07-2010 03:18 AM
Zipping files - Please help me its urgent tvbhkishore UNIX for Dummies Questions & Answers 3 07-12-2010 03:50 AM
Zipping files? trob UNIX for Dummies Questions & Answers 4 04-10-2009 05:10 AM
zipping files shary Shell Programming and Scripting 3 07-21-2008 05:58 AM



All times are GMT -4. The time now is 12:08 PM.