5,628 reputation
520
bio website timkennedy.net
location Virginia
age 42
visits member for 3 years, 2 months
seen Apr 10 at 16:23
Father, Husband, SysAdmin, Brother, Son. In reverse chronological order.

Dec
25
comment How does the piping in this command ultimately achieve to kill the process?
actually xargs will batch the commands into groups of 50 or so, so it runs kill 1 1804, and if there were more than 50 PIDs, it would execute more batches. This is why it can be beneficial to do ls | xarg -iz rm z instead of deleting files one by one.
Dec
25
comment Is there any point in using `sudo` when you are the sole user of your machine?
Also, the use of sudo increases the likelihood that you remain the only user of your computer.
Dec
22
comment Gives access to root user for a period of time
Does the user require root access? Or just elevated privileges for specific tasks? As @Gilles mentioned, once you give someone root, there's really no way to guarantee that you can take it back. You'd be better served putting the effort into designing a role account, or a sudo profile that provides exactly the required privileges, with nothing extra.
Dec
16
comment iSCSI device mapped to different SCSI device
This OP's question wasn't really what I was looking for, but this answer turned out to be the answer I needed. Thank you.
Nov
14
comment Is it possible to find out what program or script created a given file?
Sorry. site got hacked, and was down for a while. new page is at timkennedy.net/2010/12/logging-shell-commands-to-syslog-on.html
Aug
27
comment Solaris 11: Accessing a pool on disk from live DVD?
Glad to hear it. :)
Aug
20
comment How to increase the system CPU load/utilization in Solaris 10 to test nagios?
some solutions are here: stackoverflow.com/questions/2925606/…
Aug
16
comment $PWD variable equivalent of pwd -P
some shells support $(pwd -P) syntax, as opposed to back ticks, but I don't think (t)csh is one (or two) of them. Also, for why you shouldn't script in (t)csh, see: shlomifish.org/open-source/anti/csh
Aug
15
comment Periodically get new lines from file, possibly logrotated
Just use logtail. linux.die.net/man/8/logtail
Aug
15
comment Why can't we execute a list of commands as different user without sudo?
This question was also asked on Superuser, at superuser.com/questions/93385/…, and this answer superuser.com/a/573882/76251 provides a HERE DOC -like method for changing users within a script.
Jul
28
comment How can I make Ctrl + Alt act like Alt gr in Ubuntu?
have you tried playing with the mappings of the composekey? help.ubuntu.com/community/ComposeKey
Jul
27
comment whats a good tool to search tail -f output
see if the answers in unix.stackexchange.com/questions/25211/… can do what you want. the OP there wanted it to alert, but there's an example using regexes to match and beep. you could use the same regex matching, and have your own action.
Jun
14
comment Perl - /etc/shadow - Permission Denied
Solaris honors setuid for me. try 'chmod a+sx test-script.pl'. Adding a user who should be able to to read the shadow file to the shadow group is probably a better solution, though.
Jun
11
comment Why `host` and `nslookup` on Solaris 10 resolves hostnames while `ping` and `telnet` does not?
@AdamSiemion keep in mind that many of Solaris' largest customers are closed environments where DNS may not necessarily be used, and instead NIS holds sway. (or LDAP sometimes). Sun used to focus most of it's energy on it's top 50 customers. DNS stuff was added for the rest of their customers, but not made the default, because revenue from the top 50 > the rest. Oracle likely plays a similar game.
May
24
comment Automating tasks on a website on a headless server
You can use the Firefox Live HTTP Headers plugin to record a session between your browser and the website, so that you understand the full path interaction, too. What cookies do you need to store? Present? What forms are called with what variables and hidden variables, etc. Once you have all that, it should be achievable to automate the task.
May
24
comment Comparing file times in ksh
what platform are you using that doesn't have stat? if it's AIX, check if you have istat.
May
21
comment Portable way to get script's absolute path?
i like it! so far, that's pretty portable. works on Solaris, OmniOS, Linux, Mac, and even Cygwin on Windows 2008.
May
20
comment Is it common to split larger script into multiple scripts and source them in the main script?
especially given that even the older OSes like Solaris are shipping with perl, and python, etc, now. one reason older systems used shell scripts is that the shell was guaranteed to always be available, but bigger Unices, like HP-UX and Solaris, and AIX, couldn't be guaranteed to include other tools.
May
18
comment Setting file permissions in bash script
@JamesAndino the /o=rwx filter is a permissions filter that looks for r(read), w(write),x(execute) bits being set. The o means to compare the filter to the other field. You could also specify u for user, or g for group. or combinations, like -perm -u=rwx,o=rwx to match on both the user and group permissions.
May
18
comment Setting file permissions in bash script
thanks for the correction.