USEFUL UNIX COMMANDS

alter table tablename lock mode (row) – changes the locking to row on a table

rdtlock - check for locked commands

find . –name “*XXXXXX*”

find . –type f –print
xargs grep “XXXXXXX”*

find . -type f -print
xargs grep "414604645"*



ps – fu





find . -print
xargs grep "46879045-24"
pg --- > to find some text in subfolders

find ./* -exec grep -l criteria {} \;

find . -size +3000 -print
pg – finds files greater than size specified

find –mtime +7 –type f –exec rm –f {} \; - remove all files in a directory that are older than 7 days find /wdkwe/viaware/dat/log -name "LOG*" -type f –

mtime +10 -exec rm {} \; - removes all files in a directory that have a specified name and are older than 10 days

psg sup - check for base

psg “process name” – checks for the process

onstat -d – space

onstat -m – log

onstat -u – users

onstat -g - session number

cat filename
cut –c#-#
uniq (uniq will output unique numbers – no duplicates)



cat filename
tr “\r” “\n” > new filename

ls -lt
more

more filename

ls
wc – gives a file count in a directory

d1 shift-g – delete everything above

d shift-g – delete everything below

ut_sup – turns on/off schedulers

cn_su – turns on/off schedulers (isql form)

ut_debug - turns on/off logs

lp –dlst# filename - prints file to lst printer at warehouse

mailx –s “subject” recipient.name%address@menlo2 < filename

cu hostname – connect to a site using the modem

print ace reports to temp – creates a file called temp in the $ace directory with the results of the ace report that was run

crontab –l – lists the contents of cronM

crontab –r – stops cron

crontab filename – restarts cron

chmod 444 – changes the permissions on a file to make it r__r__r__

chmod 555 – changes the permissions on a file to make it r_xr_xr_x

chmod 666 – changes the permissions on a file to make it rw_rw_rw_

chmod 777 – changes the permissions on a file to make it rwxrwxrwx

tar –xf filenam.tar – uncompresses a .tar file

export TERM=vt420 – changes terminal type

stty erase “backspace key” – sets backspace key to erase backwards

smsdone – SMS2 - smshp/imports/done directory – N945S documents

smsout – SMS2 - smshp/reports directory – N945C documents

Category:  
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response.
0 Responses
Leave a Reply