How to compress files without extension


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to compress files without extension
# 1  
Old 04-28-2009
How to compress files without extension

Could someone please help?

I'm trying to compress all the files in a directory without extension. I know for typical files with extension, the command is something like:

tar -zcvf file.tar.gz *.doc

What is the command for files without extension? Thanks.
# 2  
Old 04-28-2009
Whats wrong with just * (or ./* )?
# 3  
Old 04-29-2009
/usr/bin/ls [dir]/*.* > [file]

use the X option for the exclude file in your tar command and include that file.
# 4  
Old 06-13-2009
compress

tar command is used only to archive files.

tar -cf arc.tar aa bb

use gzip like this to compress a directory tree.

gzip -r dir1 will compress all files in dir1

-----Post Update-----

[quote=indushenoi;302325192]tar command is used only to archive files.

tar -cf arc.tar aa bb

use gzip like this to compress a directory tree.

gzip -r dir1 will compress all files in dir1
# 5  
Old 06-18-2009
Im sorry I misunderstood your question...

I suppose this is more what you were looking for:
Code:
ls | egrep -ve '(\.)'|tar -zcvf file.tar.gz -

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

2. Shell Programming and Scripting

Want to compress .war extension file

Hi All, I want to compress a .war file. bash-3.00$ ls -l /opt/test -rw-r--r-- 1 test test 15M Aug 22 18:20 old.war bash-3.00$ find . -type f -exec compress {} \; ./irc.war: -- file unchanged While try to compress the above file i am getting "file unchanged error"... (7 Replies)
Discussion started by: natraj005
7 Replies

3. Shell Programming and Scripting

Compress a particular month files

Hi ALL, I am working on a folder where there are lot of files for the past one year. I need to compress a particular month files alone. suppose i need to compress the feb month files alone, what is the script we can use. Thanks in advance (2 Replies)
Discussion started by: acronis.84
2 Replies

4. UNIX for Dummies Questions & Answers

Issue: Compress in unix server and FTP to windows and open the compress file using Winzip

Hi All ! We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows. I have used the utility ZIP like the below. zip -e <newfilename> df2_test_extract.dat but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Discussion started by: sakthifire
4 Replies

5. UNIX for Advanced & Expert Users

compress the log files

Hi, I have an application which creates the logs in a date wise. like, tomcat_access_log.2009-09-12.log tomcat_access_log.2009-09-11.log tomcat_access_log.2009-09-10.log tomcat_access_log.2009-09-09.log tomcat_access_log.2009-09-08.log tomcat_access_log.2009-09-07.logNow my requirement is... (5 Replies)
Discussion started by: skmdu
5 Replies

6. Linux

Compress files >2GB

Hi folks, I'm trying to compress a certain number of files from a cifs mount to a xfs mount, but cannot do it when the total size of the files is bigger than 2GB. Is there any limitation for above 2GB? OS is SLES 64bit The files are maximum 1MB, so there are aprox. 2000 files to compress... (2 Replies)
Discussion started by: xavix
2 Replies

7. Shell Programming and Scripting

compress directories with .tar extension

hi guys.. Since am a bit new to shell scripting, can anyone help me with this problem please.. i've been struggling with it since 2 days. :( I have a directory lets say myFolder and within it I have sub directories let say myFolder1.tar, myFolder2, myFolder3, etc. I need to write a shell... (12 Replies)
Discussion started by: kanexxx
12 Replies

8. Shell Programming and Scripting

compress files

Could someone give me an idea how to compress all files from a given directory that are not of type .z (compressed). Please help. (2 Replies)
Discussion started by: lesstjm
2 Replies

9. Filesystems, Disks and Memory

Compress files on NAS

Hello, I am having difficulty compressing the files using compress or GZIP utility on NAS share NFS mounted on my linux server. Any one have idea on how to do this ? I get the followign error but the trying to compress the files STRP2> compress STR_OUTBOUND_CDM_LOG_LOB.PRT2008_26.txt... (0 Replies)
Discussion started by: kamathg
0 Replies

10. UNIX for Dummies Questions & Answers

Compress files

Hi All, I would like to archive some of the scripts below(USFINUM042006_01.CSV USFINUM042006_02.CSV and USFINUM042006_03.CSV )and also use a wildcard e.g. <command> USFINUM*.CSV. Also there are a lot of similar files but I want only the three latest files to be compressed. Which is the best... (3 Replies)
Discussion started by: indira
3 Replies
Login or Register to Ask a Question