Posts tagged ‘gzip’

Actually newbies in Solaris ( and experienced users in Linux :-)) have troubles with some every-day routines which works in Solaris in a different way than in most Linux like Ubuntu. Below I try to list most ”popular” problems and questins about differences in Solaris and Linux and try to figure them out.

  • grep doesn’t have -r switch, so there’s no recursive looking throught directories, here’s alternatives for recursive grep on Solaris :
    grep 'somestring' `find . -name '*'`
    find . | xargs grep 'somestring'
  • tar doesn’t support -z option, so tar xfz my_archive.tar.gz will fail with error “tar: z: unknown function modifier“. To unpack tar.gz archive on Solaris you may use this one :
    gzip -dc my_archive.tar.gz | tar xvpf -
  • how to set environment variables in Solaris ( i set them in \~/.bashrc, but it doesn’t works )  : to make Solaris read and apply to user environment barsh_rc file try to create file ~/.bash_profile in your home, and put in it lines listed below :
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

To be continued…

Usefull links : Solaris Infrequently Asked and Obscure Questions