12,428 reputation
2963
bio website
location
age
visits member for 2 years, 11 months
seen 5 hours ago

19h
comment How can I use chmod to remove permissions for specific folders or file in my directory?
@eyoung100, a) there is no /etc/groups. there is /etc/group. b) Normally it has read permission for all. No need to use sudo. c) no need in cat. you can simply grep nobody /etc/group. d) how chgrp to nobody can help here?
19h
comment How can I use chmod to remove permissions for specific folders or file in my directory?
I believe it's a bad advice to use sudo if you don't know the root of the problem.
19h
comment How can I use chmod to remove permissions for specific folders or file in my directory?
Do you have an error using chmod or why you can't use it?
19h
comment Is test or [ or [[ more portable both between bash shells and between other shells?
@gnp, well. a) please check comment from Michael. There is a short explanation that initially there was a different question. I just left the answer for history. b) The answer was mostly about difference between && .. || and if .. else .. fi.
Nov
18
comment SSH PC at office in local network from home
In the same way. autossh is wrapper for ssh which is able automatically restore connection in case of connectivity lost.
Nov
18
comment SSH PC at office in local network from home
-N option tells ssh do not perform actual login and it will just open tunnel and hand till disconnected with ^c or network issue
Nov
18
comment How to compare directories with binary files
and -q to disable actual diff output for text files.
Nov
16
comment Is test or [ or [[ more portable both between bash shells and between other shells?
@evilsoup, updated. May be I'm not the best explainer, though I hope it will be clear now.
Nov
16
comment SSH PC at office in local network from home
There is no -P option in ssh. $ man -P 'cat' ssh | grep -- -P | wc -l # --> 0
Nov
15
comment How to add PuTTY private key to OpenSSH client
pub keys are stored in ~/.ssh/authorized_keys not in known_hosts
Nov
15
comment How to add PuTTY private key to OpenSSH client
@user53029, putty key is multiline with headers. if you removed only headers it makes no sense. to convert you can use ssh-keygen -i -f /path/to/ppk/pub
Nov
15
comment How to add PuTTY private key to OpenSSH client
did you convert putty ppk to openssh format before merge?
Nov
11
comment Make WGET available without path
You have to remove wget from PATH. Only /usr/custom/bin/ has to be added.
Aug
20
comment Cygwin has no watch command?
@robert, it is a placeholder.
Aug
7
comment Delete all lines containing “..” and “@”
You can also use sed '/@/{/\.\./d}' which is a bit shorter :)
Jul
30
comment replace lines in a text with matching text
Look more carefully on patterns to replace. ps. downvote is not from me.
Jul
30
comment replace lines in a text with matching text
this will not work. OP needs to apply only for strigns with everyone. And obviously not only for the second line.
Jul
28
comment waiting for network in a bash script
no need to redirect grep output to /dev/null. Use -q option instead. And also I don't thing grepping ifconfig is a good idea. Why not to use ping instead?
Jul
28
comment Combining sed statements
Note that it will not work if OP has 3 or more lines with numbers. If it's just like in example, then it's fine.
Jul
21
comment sed regex issue
Do not redirect file to itself. In the end you may stay with an empty file. Use sed -i (only for gnu sed) instead or separate temporary file. Also you can use \s instead of [[:space:]] as it also includes \t and all other whitespaces.