Reputation
354
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 9
Newest
 Nice Answer
Impact
~81k people reached

  • 0 posts edited
  • 0 helpful flags
  • 98 votes cast
Apr
18
comment disable a usb port in linux
Have you tried removing the device file/dir? e.g. sudo rm -rf /dev/bus/usb/001 Often you may recreate device files using MAKEDEV (man MAKEDEV, e.g sudo MAKEDEV usb, or if the kernel recreates their /dev space, by rebooting, or by noting their major/minor device numbers and using mknod directly)
Mar
14
comment Why is egrep [wW][oO][rR][dD] faster than grep -i word?
So you have demonstrated to yourself that the original premise/assertion leading to the question is basically incorrect, right? egrep [wW][oO][rR][dD] is not faster than grep -i word under the same locale and given file in in the buffer-cache.
Jan
18
comment What's wrong with this for loop in bash script?
+1. This is the most elegant/general solution, because it doesn't rely on the name substrings $i being numeric. For greater clarity, I would move the 4 invariant assignments of AR1_p...=... out of the loop (before the for), and also rename VARIABLE to VARNAME
Dec
24
answered Generate two sequences of numbers separated by “|”
Oct
13
comment Do hard links count as normal files?
links in Unix are names referring to data (inodes) in the filesystem. It is the data that determines the type of the "file" (a normal file, socket, pipe, device etc), sizes, permissions, modified times, etc. The link (name of object) has nothing to do with what kind of data is, you can name the object as you please, so the answer to the OP question is NO.
Oct
5
comment What is the difference between * and *.* while copying?
@jamesdlin. Since the 1st day of Unix (circa 1969), directory entries starting with a dot were considered hidden. Originally this was needed to skip the . (current directory) and .. (parent directory) entries which always exist in any directory (even empty dirs). Ritchie and Thompson later considered it to be a useful feature to hide (by default) all the .*rc config files and added an explicit -a option to ls to display all these (leading-dot) "hidden" entries. So this is not very surprising knowing Unix history. A leading dot in Unix has been special since "forever".
Oct
5
comment How does the command sed '1!G;h;$!d' reverse the contents of a file?
As mikeserv hints. One should note that this tricky sed recipe is an extremely inefficient way (O(n^2/2) complexity) to reverse lines in a file. It would be prohibitively slow for files with a large number of lines. For a much more efficient line-order reversal alternative see tac from GNU coreutils.
Sep
30
answered How to copy a folder structure and make symbolic links to files?
Sep
11
comment How to grep -v and also exclude the next line after the match?
Given that (GNU) grep already supports PCRE (via the -P option), what is the advantage of using pcregrep?
Aug
22
awarded  Nice Answer
Jul
25
comment How to route specific adresses through a tunnel?
Note: at least on ubuntu -interface isn't an option of route so the above suggestion gives a usage error. Also how will this result in routing via the ssh tunnel as the OP asks?
Jun
22
comment Why am I still getting a password prompt with ssh with public key authentication?
Please note that generally, allowing remote root logins is not a recommended security practice.
Apr
27
awarded  Informed
Apr
13
comment What are the pros/cons of deb vs. rpm?
Yes, precisely. And well said.
Mar
23
answered Transfering large (8 GB) files over ssh
Feb
4
awarded  Commentator
Feb
4
comment The myths about malware in Unix / Linux
Check out this quora answer: goo.gl/UVCsgz it covers the main reasons why Linux/Unix is different than Windows in terms of chances of being randomly infected by malware.
Sep
24
awarded  Autobiographer
Jul
21
comment How to make user passwords shown as a clear text in Linux?
it is not true that passwords are stored in /etc/passwd. At least not in the past ~20 years, since /etc/shadow was invented. The 'x' you see there is not the encrypted password. It is a literal 'x' which can not possibly match any MD5 or SHA1 etc sig.
Jul
9
comment What is the difference between these two SSHD configs?
I mean that just by reading the man pages, Raza's answer sounds correct. Of course, to really be sure someone should actually verify it before answering :)