19,317 reputation
34072
bio website
location United States
age
visits member for 3 years
seen 8 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


Jan
24
comment Which shell should I use - tcsh vs bash?
@xenoterracide I would argue that if you are going to invest the time to learn a new shell, portability is a legitimate consideration, especially if you ever plan on working on machines where you do not have the privileges or ability to install a new shell. I've yet to find a system that has doesn't also have bash or some POSIX compliant sh clone like ksh.
Jan
24
comment Why SSH is asking for my private key password each time
Blind guess by me: check that your key is loaded with ssh-add -l.
Jan
24
comment Can I access Nth line number of standard output?
In case you feel like trying to parse ls output, read this first.
Jan
24
comment Search and replace next n words in vi
Just a note: the linked question restricts the occurrences to a single line whereas this question seems to be asking about the whole file. However the same techniques would apply by simply prepending a range of % to any :s command in any of the answers there.
Jan
24
answered Vim :s replace first N < g occurrences on a line
Jan
22
answered How do I shut down a system through a ConsoleKit DBus message as user?
Jan
21
comment How do I shut down a system through a ConsoleKit DBus message as user?
What is your consolekit version? This Debian bug report suggests that an upstream change between versions 0.4.1 and 0.4.2 caused this, but no official solution exists yet. You can read the bug report and see if any of the suggestions work for you.
Jan
18
comment Fedora 16 - Iptables installed, but no iptables service available
iptables is not a system service. It is a frontend to the netfilter packet filter inside the kernel. You shouldn't need to start it.
Jan
17
comment Is Linux really malware safe? Or people just don't bother creating them for Linux?
See the myths about viruses in unix/linux.
Jan
16
comment Revert commits and commit them to a branch?
@TKKocheran: Thanks for the edit and catching the --force bit.
Jan
16
answered Revert commits and commit them to a branch?
Jan
13
comment Using umask to set group permissions
So basically, you want to automatically set a umask of 002 for all members of a certain group? I might go dig around in PAM, e.g. adding a pam_umask invocation to common-session or something similar.
Jan
13
comment bash function to find a directory recursively
You can save a process by replacing dirname "$cwd" with cwd=${cwd%/*}; cwd=${cwd:-/}.
Jan
13
comment bash function to find a directory recursively
@Arcege The function could save and restore the cwd, and even $OLDPWD to be extra thorough.
Jan
12
comment Is it possible to test user name and password?
Not related to the question, but I hope you are encrypting the traffic to your web server so that user logins can't be sniffed off the wire.
Jan
12
comment How to delete the oldest directory in a given directory?
A tangential comment: if you are looking for a rotating backup solution it's usually easier and less maintenance to find an existing robust solution than to roll your own. Examples of some simple ones include rsnapshot and rBackup.
Jan
11
comment Why is my bash prompt getting bugged when I browse the history?
@korda I find using single quotes to remove the backslash doubling helps a lot. I also set the character sequences to variables, which helps a bit as well. My PS1 looks like PS1="${reset_color}[${cyan}\A${reset_color}]${reset_color}${user_color}\u@\h(\l‌​)${white}:${blue}\W${reset_color}[${yellow}\$?${reset_color}]${white}"'\$'"${rese‌​t_color} "
Jan
11
comment GNU emacs vs. XEmacs
@nCdy Since the OP's question specifically mentions community and doesn't mention look at all, this is a perfectly valid answer to the question. Your comment would probably make more sense on the question and not here.
Jan
11
comment What is the syntax of a complex condition in shell?
@Offirmo Exactly - the point is bare /bin/sh does not have [[, and you can't rely on sh being a symlink to bash everywhere.
Jan
10
comment What is the syntax of a complex condition in shell?
@Offirmo You are correct: a shebang of /bin/sh will invoke /bin/sh. The problem is /bin/sh does not accept [[. You can either not use [[ or use a shell that does accept [[, e.g. ksh, as your shebang.