2,154 reputation
414
bio website
location The Netherlands
age
visits member for 1 year, 6 months
seen 17 hours ago

“The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.”

"Daniel J. Boorstin


Jan
14
comment How to copy a folder by another, but NOT by merging/adding
so include the trailing slash. Use the following: rsync -r --delete-during /backup/location/ /production/directory
Jan
14
comment How to copy a folder by another, but NOT by merging/adding
You could use rsync as follow rsync -r --delete-during /backup/location /production/directory which will scan directories while syncing and put the same content of /backup/location/ to /production/directory
Jan
6
comment Please provide pptpd authentication methods other than chap secrets
If you want to be able to use different authentication methodes, you can have a look at strongswan.org
Jan
2
comment awk causing memory leak?
First of all. awk is not suited for 100million lines. If you ask a real question and show what you would like to do with the processed lines, there might be another "faster" solution
Dec
27
comment Disable of coloring for ls on NTFS filesystems
Kristoffer: askubuntu.com/questions/208345/…
Dec
27
comment Disable of coloring for ls on NTFS filesystems
THere is a simple method you can apply. ls -fl will do what you want.
Dec
24
comment Passing a variable to a bash script when sourcing it in another bash script?
Don't update the question please. This way we cannot see what was wrong with your initial question. I just rolled it back.
Dec
10
comment How to quote arguments with xargs
You should read this mywiki.wooledge.org/UsingFind?highlight=%28xargs%29 before doing anything with xargs. Also as the wiki suggests, don't use xargs without passing the -print0 to find.
Nov
25
comment Remove everything that is not a 4 character number
@KasiyA you can add .. file | tr '\n' ' ' to put the numbers in the same line.
Nov
25
comment Compare and print data from different text files to one in Shell
You can use paste -d'' file1 file2 file3. That's what paste does
Nov
22
comment Cannot type in login credentials in Red Hat
Did you try another tty by pressing ctrl+alt+F2 ? Does the prompt show a Username: prompt?
Nov
21
comment Group by and sum in shell script without awk
@jimmij Your answer is ofcourse the OP wanted. Thanks for providing this solution!
Nov
21
comment Group by and sum in shell script without awk
@jimmij I am curious on your sh answer. If you can achieve the above in sh only, I'll remove my answer!
Nov
21
comment Group by and sum in shell script without awk
@jimmij I can hardly imagine it can be done in purely sh without calling any external binary like uniq, sort etc.
Nov
21
comment unable to initialize table filter
Alright, so try modprobe /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/iptable_filter.ko. Also specify < when using iptables-restore
Nov
21
comment unable to initialize table filter
Use the -t and -v So you have more verbosity. I suspect you need to load the module iptable_filter. Check what modules there are availiable ls /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/
Nov
21
comment 0 byte file created in a simple script
@MichaelKremser I don't think that will work the way how he dumped the output to file1.txt. This file will include % in the second field. while read ... percentUsed will have % sign in there and will never be compared.
Nov
11
comment Grep for pattern at start or middle of a line
@LuisAntolin This part "Tested on Debian 7" (bash). Your answer has no bash included whatsoever.
Nov
11
comment Grep for pattern at start or middle of a line
@LuisAntolin apart from the answer. Please remove (bash) there since the answer has nothing to do with bash. It will probably confuse novice users.
Nov
9
comment Strip Filenames and Rename
A nice one terdon. Though I'd have used ((c++)) instead of let to increment.