Showing posts with label cmd-fu. Show all posts
Showing posts with label cmd-fu. Show all posts

Thursday, January 30, 2014

Pure command line if then without the if or then

The && and || can be used to control command flow like if then...
$ /use/bin/somecmd && echo "it worked!" || echo "epic fail!"

Process list filtering with grep

Adding the square brackets prevents the grep command from showing up in the process list.

$ ps -ef | grep proces[s]

Icinga log parsing perl command

The perl command changes unix time to human readable time in the output... Very useful for searching the check log archives.

more /usr/local/icinga/var/archives/* | perl -p -e 's/^\[(\d+)\]/"[". localtime($1) . "]"/e' | grep <what you're looking for>

Tuesday, July 26, 2011

Procmon

Copy procmon.exe and psexec.exe to c:windowssystem32

psexec -i -s -d procmon.exe

This command runs procmon interactive as the system account.

You can use this to troubleshoot Citrix user permissions issues.

Filter based on result "ACCESS DENIED"