% renice priority pid
% ~/bin/rename.pl 's/.html/.adp/' *.html
% ~/bin/rename.pl 'tr/A-Z/a-z/' *
/bin/who -r
% du -sk dir_name
% ncftpget -R -u username -p password host urgle /
% cd directory
% find . -name "*.html" -exec grep Spoon {} ; -print
Don't forget the dot right after find
, and the {}
construct.
bash$ ulimit -c unlimited
% grep -c gethandle *.tcl
% ifconfig -a
% date '+%s'
% gunzip -c blah.tar.gz | tar xf -
cp -r
does not work for moving a directory hierarchy since it doesn't honor symbolic links (you end up with a copy of the file for each sym link). Instead, you'll need to do a "push-pull" tar using a pipe. To move /tmp/blarg
to /var
:% cd /tmp
% tar cvf - blarg | (cd /var; tar xf -)
# ifconfig eth0:1 192.168.100.43
# shutdown -i 6 -y -g 0
perl -pi.bak -e 's/OLDSTRING/NEWSTRING/g' *.html
find . -type f -name "*.html" -exec grep Spoon {} ; -print
$ for file in *; do
> wc -l $file;
> done
% sudo sh -c "tar cf - * | (cd /mirror4/web; tar xf -)"
# netstat -tupan
% psrinfo
/var/log/authlog
% sudo netstat -anp --protocol=inet
bash -c 'tar cf /tmp/touchmymonkey.tar `find . -newer /some/file/to/compare/timestamps/with | grep "^.$"`'The grep is necessary to prevent double-addition of files.
% cd DIRECTORY
% tar cf - . | gzip | ssh dev0103-003 "cd /web/greentravel-dev; gunzip | tar xf -"
# vi /var/named/db.arsdigita.com find markd change IP to the one you want go to top of file change the serial number to something appropriate the format is YYYYMMDDso if isn't today, change it to today. # ps -ef | grep named # -HUP the named process. # nslookup and see if it's there. if not, find rolf and whine
rpm -Uhv
% find . -name "*.jpg" -exec convert -verbose -geometry 150x150 {} {} ;
% find . ( -name "*_itin.htm" -o -name "*_faq.htm" ) -exec `pwd`/strip-junk.tcl {} ;
- Where can I get gmake?
To build the Oracle Driver for AOLserver you need gmake. ftp it from a GNU mirror:
ftp://aeneas.mit.edu/pub/gnu/make/make-3.77.tar.gz
or snarf it from
http://markd.arsdigita.com/misc
- debugger/threads on Solaris
gdb doesn't seem to work. dbx seems happier
(dbx) threads
(dbx) thread -info t@threadnum
- finding setuid and setgid files
% find . -type f ( -perm 04000 -o -perm -02000 ) -print
- removing files with "-" in them
% rm -- -bad-file-name
- using ssh without a password
for things like remote cvs.
1.on the remost host login as nsadmin and run ssh-keygen with no
passphrase to create ~/.ssh/identity and ~/.ssh/identity.pub
2.copy identity.pub to the repository host and append it to
~nsadmin/.ssh/authorized_keys
3.chmod 400 ~nsadmin/.ssh/authorized_keys
% perl -pi.bak -e "s/
//g" *.adp
% rpm -ql package-name
% rpm -Vf /the/filename