1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unix/Solaris find in files ?

Discussion in 'Linux / Unix Discussion' started by dmarsh, Mar 19, 2008.

  1. dmarsh

    dmarsh Terabyte Poster

    3,782
    302
    184
    Hello,

    Does anyone have a quick and easy way to search by filename and text file content inside zip and tar files on solaris ?

    thanks ! :D

    Dave
     
    Certifications: CITP, BSc, HND, SCJP, SCJD, SCWCD, SCBCD, SCEA, N+, Sec+, Proj+, Server+, Linux+, MCTS, MCPD, MCSA, MCITP, CCDH
  2. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,623
    115
    224
    Hm - can't think of an easy way for tar files, but check if your copy of Solaris has gzgrep for gzip files. (zip files in the unix world aren't normaly that common - are these really zip and not gzip?)

    Otherwise create a empty temp directory and write a script to untar/unzip, then do a find + grep.

    Edit: File name search is easy for tar files - tar -t + grep.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+

Share This Page

Loading...