Compressing a Directory in UNIX ???


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Compressing a Directory in UNIX ???
# 1  
Old 03-13-2008
Compressing a Directory in UNIX ???

Hi All,

I am new to UNIX. I have a small problem to be solved.

I have directory where all the log files/list files generated by SAS Program.

Q1) Can we compress the folder(Directory) as Windows zipping.

Q2) If yes what is the command to be used to achieve the probelm.

Q3) If we do so, in future if I uncompress the folder/directory will there be any chance of files being currepted.

To my understanding we can only compress the files in a folder/directory using gzip -r.

Please suggest in this regard.

Thanks in advance.


Regards
Manas
# 2  
Old 03-13-2008
Quote:
Originally Posted by manas6
Q1) Can we compress the folder(Directory) as Windows zipping.
Yes
Quote:
Originally Posted by manas6
Q2) If yes what is the command to be used to achieve the probelm.
zip
man zip for more details
Quote:
Originally Posted by manas6
Q3) If we do so, in future if I uncompress the folder/directory will there be any chance of files being currepted.
None that I can think of
# 3  
Old 03-13-2008
Hi

When I am trying to use zip it is giving the 'zip error: Nothing to do! (thrinadh.zip)'.

Please suggest
# 4  
Old 03-13-2008
i think you forgot to mention the directory that you want to compress. did you try:
Code:
zip filename.zip

instead of
Code:
zip filename.zip /dir/to/zip/

# 5  
Old 03-13-2008
Q1) Can we compress the folder(Directory) as Windows zipping.

Why would you want to do so?

Is you plateform Win.. or unix?
The only case I see people wanting that, are people using enterprise guide, in which case they can go ahead since it lies on a samba share... is it your case?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compressing & removing files in a directory & subdirectory

Hi, I want a simple line of code that will compress files within a directory specified (parameter) and its subdirectories and also i want to remove files which are exactly 365 days old from the sysdate after this compression. Please help. Thanks, JD (8 Replies)
Discussion started by: Jesshelle David
8 Replies

2. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

My input is as below : /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt /splunk/scrubbed/triumph/ifind.triumph.txt From the above input I want to extract the file names only . Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies

3. Shell Programming and Scripting

Compressing all directories inside a directory and remove the uncompressed version

hi pls give me a script to compress all directories inside a directory and remove the original uncompressed version... >> please also tell the single commmand to uncompress all the directories back...whemn needed (2 Replies)
Discussion started by: dll_fpga
2 Replies

4. Shell Programming and Scripting

Checking directory permissions on UNIX directory

Hi, How do i check if I have read/write/execute rights on a UNIX directory? What I'm doing is checking read access on the files but i also want to check if user has rights on the direcory in whcih these files are present. if then...... And I check if the directory exists by using... (6 Replies)
Discussion started by: chetancrsp18
6 Replies

5. Shell Programming and Scripting

File transfer from one directory to another directory in unix

Hi, I have to transfer five files from one directory to another directory in unix with the help of shell scripts. This shell script calling the param file as input parameter. Every day one file will come and fall on my source directory. Remaining files will fall on any one of the day of the... (5 Replies)
Discussion started by: easterraj
5 Replies

6. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

7. UNIX for Dummies Questions & Answers

compressing a directory

I have a pretty large directory on a backup hard drive. I have Tiger for an OS, what would be the best way to compress this directory. there is a large number of files inside in addition if that makes a difference any help appreciated hopefully thanks in advance (2 Replies)
Discussion started by: cleansing_flame
2 Replies

8. Shell Programming and Scripting

tarring/compressing files in Unix directory

hi guys, i'm totally new with Unix sripting and no idea how to do the scripting at all. My problem is that my boss asked me to do this: 1.) create a script that will tar or gzip the files in particular directory eg: i'm on my home directory and I need to tar/gzip the file in.. assuming... (1 Reply)
Discussion started by: montski
1 Replies

9. UNIX for Dummies Questions & Answers

moving files from a unix directory to a windows directory

Any body any ideas i'm failry new to this so any help would be appreciated. Cheers Steve (2 Replies)
Discussion started by: gleads
2 Replies

10. UNIX for Dummies Questions & Answers

Compressing files from DOS to Unix

As the title sugests I need to compress files from DOS to Unix. The files should be in .Z format, as created using 'compress' in an Unix environment. Ligs (2 Replies)
Discussion started by: ligs
2 Replies
Login or Register to Ask a Question