Bruce Linux Commands:
Useful Linux Commands:
cd ~
cd ~/bin
cd public_html/perljam/
cd $ENV{HOME}
chown 755 ucsevsix sampledir/
chown -R 755 ucsevsix sampledir/
clear
compress -fv *
AND unzip -l a.zip
(to show what's in "a.zip")
convert -version
[imagemagick executable]
df .
diff
dir
[not an alias, real Linux command]
"ls -C -b" is same as "dir" will show directories in vertical columns
"ls -la" shows directories with permissions, owner, group, size, date, name
du -c -h /home2/ucsevsix/public_html
du --exclude='*well-known*'
du -c -h --exclude='*well-known*' /home2/ucsevsix/public_html
echo $PATH
echo $(( $(getconf ARG_MAX) - $(env | wc -c) ))
echo $var | awk '{print length($0)}'
enscript -Br -fCourier8 filename.lst
env | wc -c
expr 2 + 7
9
expr 9 - 7
2
expr 3 \* 6 # for some reason, need to enter backslash before "*"
18
expr `getconf ARG_MAX` - `env|wc -c` - `env|wc -l` \* 4 - 2048
find . -name *my.cnf*
find ~/. -name *my.cnf*
find ~/ -name *my.cnf*
find . -name "*19*.req" -print
find . -name "*.req" -print | xargs rm
DO NOT ENTER THIS COMMAND
Magic bullet for deleting massive
number of files in Linux. This
gets around the "argument too long"
error message
getconf ARG_MAX
grep bullet ~/public_html/perljam/*.pl
grep -w Bullet ~/public_html/perljam/*.pl
[-w searches for whole word]
grep -r 'font' .
[-r recursive, use period at end]
grep -i 'font' *.html
[-i ignore case]
grep -l 'font' *.pl
[-l filename only]
grep -ril 'font' .
[recursive, ignore case, filename only]
grep -v 'text/java' myfiles.html
[-v no match, selects non-matching lines]
grep -i 'javascript' *.html | grep -v 'text/java'
history
htop - displays real-time advance, color coded process viewer
identify -version
imagemagick
jpico my_linux_file
ls -alx | grep /
ls -alx | grep / | grep -v nfs
THIS NEEDS WORK -------------------->
ls --ignore (similar to --exclude for "du")
ls -I "*.log"
ls -l (which automatically hides items starting with ".")
ls -l -I ".*" ignores directories starting with a dot ".xxxx"
ls -l -I ".*" -I "access-logs*" -I "www*"
man ulimit
man chgrp | col -b > hlpchgrp.txt
use this to create help files
in easy to read format
more .mysql_history
more .bash_history
more filename.* | grep stuff
nohup compress *
pico my_unix_file
ps -ef | grep ucsevsix
ps -ef | grep sqlplus
perl executive_dashboard_mms.pl
perl -version
perl -MLWP::Simple -e 'getprint "http://wireless.schwab.com/pub/q?TY=ind&mk=xhtml"'
# Still works
perl -MLWP::Simple -e 'getprint "http://wireless.schwab.com/pub/q?TY=ind&mk=xhtml"' |grep Dow
perl -MLWP::Simple -e 'mirror ("http://wireless.schwab.com/pub/q?TY=ind&mk=xhtml",BRUCE_FILE)'
more BRUCE_FILE
perldoc -f sort
pwd - present working directory
sar -q
strings -f * |grep pass
tail -25 /etc/filename.ext
top
top -n1
ulimit -s
ulimit -a
uname -a
/usr/sbin/psrinfo -v
wget - downloads files from target http or ftp links
which perldoc
who | grep bfd
whoami
whereis perl
Misc DOS commands:
file:///c:/
file:///c|/WINNT/system32/cmd.exe
{only works in MSIE}