Search Results

Search: Posts Made By: geekosaur
Forum: Cybersecurity 03-31-2009
6,617
Posted By geekosaur
Oh, and another alternative is to give the vendor...
Oh, and another alternative is to give the vendor a non-root account and have them use sudo with restrictions in /etc/sudoers. The vendor might not be willing to play along with this, though.
Forum: Cybersecurity 03-31-2009
6,617
Posted By geekosaur
Only by running separate sshds on all network...
Only by running separate sshds on all network interfaces.

The better way to do this is AllowRootLogin without-password or AllowRootLogin forced-commands-only, then generate a public/private...
2,353
Posted By geekosaur
dd if=/dev/zero of=dummyfile; rm dummyfile ...
dd if=/dev/zero of=dummyfile; rm dummyfile
Which just fills all available disk space with zeroes. You might want to follow withdd if=/dev/urandom of=dummyfile; rm dummyfile to overwrite with random...
Forum: AIX 12-24-2008
13,360
Posted By geekosaur
SIGPIPE is sent when the receiving end of a pipe...
SIGPIPE is sent when the receiving end of a pipe or socket has been disconnected. If you ignore SIGPIPE (see sigaction()) you will get a trappable error EPIPE instead.

Other than that, you want...
7,874
Posted By geekosaur
You should be able to read any variable that has...
You should be able to read any variable that has been set at that point. Assigning to it won't work because the pipe forces the while loop to run in a subshell; assignments will be visible within...
1,892
Posted By geekosaur
That won't work because you need to tell it the...
That won't work because you need to tell it the address pattern match uses # instead of /. The solution:sed -e "\#$param_name#s#$current_value#$target_value#" abc.txt >> output.txtThe initial...
Forum: HP-UX 11-15-2008
10,509
Posted By geekosaur
Generally it's "top". You may need to install...
Generally it's "top". You may need to install it, though, which will likely require you to be root. Unix Top (http://unixtop.org/)
3,312
Posted By geekosaur
~ is only guaranteed to work in interactive...
~ is only guaranteed to work in interactive shells (and not even then if it's the old Bourne shell as on Solaris). $HOME is the correct portable way to refer to your home directory.
Forum: Programming 10-29-2008
14,825
Posted By geekosaur
Message queues don't work like file descriptors,...
Message queues don't work like file descriptors, and can't be used with select().

The usual way around this is to fork a subprocess which waits on the message queue and writes the data down a pipe...
5,655
Posted By geekosaur
If you're looking on Linux or one of the BSDs, I...
If you're looking on Linux or one of the BSDs, I believe you'll find nice() is part of libc and is a wrapper for setpriority().
2,338
Posted By geekosaur
It is looking for a process whose argument list...
It is looking for a process whose argument list contains the string${SUNMC2OSS_PATH}/SunMC2OSS\.jar.* sunmc2oss\.SunMC2OSS\$ where the "\." sequences match literal "." characters (instead of any...
12,309
Posted By geekosaur
You mean this one ("REDIRECTIONS WITH NO COMMAND"...
You mean this one ("REDIRECTIONS WITH NO COMMAND" in zshmisc(1))?

Otherwise, if the parameter NULLCMD is set, its value will be used as a
command with the given redirections. If...
3,228
Posted By geekosaur
Does the first file have a space after the ">"? ...
Does the first file have a space after the ">"? If so, look at the "join" command.
12,309
Posted By geekosaur
Or, without using an external command::...
Or, without using an external command:: >filename(In any Bourne-style shell but zsh, simply ">filename" will work; zsh will insert a default command (whose default value is "cat").)
4,850
Posted By geekosaur
That makes a big difference; "\" is treated...
That makes a big difference; "\" is treated specially by the shell. I would start by quoting all the assignments and variable expansions: a="`foo bar`"
echo "$a"
4,688
Posted By geekosaur
find . -ls | awk 'BEGIN {s = 0; f = ""} $7 > s...
find . -ls | awk 'BEGIN {s = 0; f = ""}
$7 > s {s = $7; f = $11}
END {print f}'Assumes GNU find.
3,935
Posted By geekosaur
You are using the %f format to scanf, but storing...
You are using the %f format to scanf, but storing to an (int). (%f requires a (double) to receive the result. GNU C with -Wformat would warn you of this mistake.)
4,362
Posted By geekosaur
I don't see why "expr" is there at all; and it...
I don't see why "expr" is there at all; and it won't understand suffixes.
$ size_dir_pass=1.2gb
$ size1=${size_dir_pass##*[0-9.]}
$ echo $size1
gb
4,396
Posted By geekosaur
egrep -v '^.{55} ' (assuming your columns...
egrep -v '^.{55} ' (assuming your columns start at 1; use {54} for 0-based)
4,850
Posted By geekosaur
The only way I can think of for that to happen is...
The only way I can think of for that to happen is if $IFS is set to "/" (which is done in some shell scripts to break a path into components; it should be changed back to the default immediately...
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy