UNIX commands 2
Terms
undefined, object
copy deck
- top
- System status
- df
- free space
- find YOURDIR -type f ¦ wc -l
- count the number of files "-f" in a folder
- find
- search for files in a directory
- du -h
-
Directory size information in human readable format
default unit: kb - grep
-
Usage: grep [options] [expression] [file(s)]
get specified data from a txt file - How set environmental variables?
-
edit .profile -file in ~ directory
run source .profile to apply changes - xargs
-
Adds arguments from standard input to command line until no arguments left.
usage: ls | xargs rm
-to overcome "argument list too long problem" you can pass arguments from ls wich always works to xargs wich will portion them fo rm. - mysql -utuomas -p -NBe "select ...;"
-
Running mysql from command line
options
-p password, must be separate
N skip column names
B give tab delimited output
e execute command in "" - less
- a text viewer
- !
-
Bash history expansion command
usage
!c
---> clear - reauth
-
Automatic AFS token renewal in a shell.
Usage:
reauth <time> <principal> [<password>]
where:
<time> is the time in seconds between reauthentications
<principal> is the name of the user
<password> is the user's password. If a password
is not specified on the command line,
it is read from the terminal - ps -A
- Show all processes, saying on ps will give processes specific to the shell. Use ps -Aef togeather with grep to find the processes you want to see.
- mpage
-
printtaus unixista
mpage -2to -Pbioinfor-colour tiedosto.ps
-P printterin nimi
-2 sivujen määrä paperiarkilla
-t kaksipuolinen printtaus
-o jätä kehykset pois - pdf2ps
-
Muuttaa pdf:n ps-muotoon.
pdf2ps syöttötiedosto.pdf tulostiedosto.ps
analoginen ohjelma ps2pdf - gv
-
GhostView
Ohjelma ps-tiedostojen katsomiseen