UNIX command

If it doesn't fit in another category, ask it here.
jyteh
Posts: 1
Joined: 2007/01/29 16:53:25

UNIX command

Postby jyteh » 2007/01/29 17:04:18

Hello All,

I would like to create a tar archive for all files with extension *.htm only under a directory ( including of the *.htm files under directories of the directory). May I know the command line should I key in ?

I just wonder on how to use the tar command with find command where I can search for files with *.htm with command "find directory -name \*.htm".
Kindly advise.

:lol:

pjwelsh
Posts: 2581
Joined: 2007/01/07 02:18:02
Location: Central IL USA

UNIX command

Postby pjwelsh » 2007/01/29 17:23:05

Try something like:
find . -type f -name "*.html" | xargs tar rvf /YOUR/TAR/FILE.tar


Is the easy command line "quickie"