Home COMSC-171 <- Prev Next ->

file transfer

wget

mkdir gnu # for download cd gnu wget https://ftpmirror.gnu.org/gnu/hello/hello-2.12.2.tar.gz # download

uncompress and extract

gunzip hello-2.12.2.tar.gz # uncompress .gz file # use bunzip2 for .bz2 files # use unxz for .xz files ls -l # original .gz file gone tar xf hello-2.12.2.tar # extract files from .tar archive # x is extract ( must be first option) # f is file (must be last option) # other options go between x and f ls -l # files were extracted to directory hello-2.12.2 rm hello-2.12.2.tar # clean up

build and install application

cd hello-2.12 ls # lots here less src/hello.c # look at the source code (if you're a C programmer) q # quit less when done less INSTALL # read the directions q # quit less when done ./configure --prefix=$PWD # prepare a Makefile which suits your system # --prefix specifies directory for install make # build application make install # install application ls bin/ # the executable is here ls share/ # info and man pages are here

run application

./bin/hello # execute hello echo $LANG # LANG defines the locale as language_country.encoding LANG=fr_FR.UTF-8 # fr_FR is French language, as spoken in France ./bin/hello # output in French ./bin/hello -x # error messages also in French LANG=en_US.UTF-8 # reset to US English man -M ./share/man hello # -M (manpath) for non-standard locations q # quit less info -f doc/hello.info # -f (file) for non-standard location # use arrow keys to scroll up and down q # quit info cd

rsync

# login to slackstu2.net (same user name and password) ls # like UNIX command rsync -av slackstu.net:gnu/hello-2.12.2 ./ # accept key, login ls hello-2.12.2 # Linux app does not build on FreeBSD without extra work

sftp

# from slackstu2.net sftp slackstu.net # accept key, login pwd # like UNIX command cd hello-2.12.2 # like UNIX command ls # like UNIX command cd .. # like UNIX command ls -a # like UNIX command get .bashrc # download file (no effect on ksh) !ls -a # run local command put .cshrc # upload file (no effect on bash) ls -a exit # quit sftp