find . -mtime +60Delete files
find . -type f -mtime +60 -exec rm {} \;Delete folders
find . -type d -mtime +60 -exec rm -r {} \;
sftp -oPort=115 <user>@<server>With Java see jsch
$ stty -a speed 38400 baud; line = 0; rows = 37; columns = 100 min = 4; time = 0; intr = DEL; quit = ^\; erase = ^H; kill = @ eof = ^D; eol = ^@; eol2 <undef>; swtch <undef> stop = ^S; start = ^Q; susp <undef>; dsusp <undef> werase <undef>; lnext <undef> -parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts -ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc ixon ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak isig icanon -iexten -xcase echo -echoe echok -echonl -noflsh -echoctl -echoprt -echoke -flusho -pendin opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3You can switch these settings
stty intr ^C stty erase ^\? stty kill ^U
uname -r = B.11.23 = HP-UX 11i v2 (PA-RISC and Intel Itanium)
vi /etc/rc.config.d/netconf vi /etc/hosts hostname uname -a machinfo getconf KERNEL_BITS model netstat -an /etc/ping <server> -n 5 nslookup tracert /usr/contrib/bin/traceroute <server>
vmstat => shows memory usage in 4KB blocks
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
se also Linux file commands
passwd <user>
find . -type l -name "*mysql*"
grep 'Walsen, Stacey' *
If you want to print the filenames you need to use head or tail, because cat won't do it.
head will diplay the filename like
==> filename <==So you need to specify that as additional search parameter with option -e.
head -n 99999 *|grep -e '1166682' -e '==>'
/usr/include/sysexits.h |
search for errno.h |
more <file> | Show file page by page |
head -25 <file> | Show first 25 lines of file |
head -c -n 200 <file> | Show first 200 bytes of file |
tail -25 <file> | Show last 25 lines of file |
vi <file> | View and edit |
#!/bin/ksh # 02.08.2011, Markus Ebel cd sp j=1 for oldfile in `ls $2` do #31945_EBELM_107_F700_107_05_ZPUINFOTYPES_20110731003204.txt len=`echo $oldfile | wc -c` len=`expr $len - 1` start=`expr $len - 20` newfile=`echo $oldfile|cut -c 1-15` newfile=`echo $newfile '.txt'` echo $j: rename $oldfile '>' $newfile #mv $oldfile $newfile j=`expr $j + 1` done #