我收到mongodb关于THP的以下警告 2015-03-06T21:01:15.526-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2015-03-06T21:01:15.526-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never' 但是我确实设法手动关闭了THP frederick@UbuntuVirtual:~$ cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] frederick@UbuntuVirtual:~$ cat /sys/kernel/mm/transparent_hugepage/defrag always madvise [never] 我加入的伎俩transparent_hugepage=never,以GRUB_CMDLINE_LINUX_DEFAULT中/etc/default/grub和添加 if test -f /sys/kernel/mm/transparent_hugepage/defrag; then echo never > /sys/kernel/mm/transparent_hugepage/defrag fi 至 /etc/rc.local 我到底该如何避免警告?
我需要搜索一个PHP变量$someVar。但是,Grep认为我正在尝试运行正则表达式,并抱怨: $ grep -ir "Something Here" * | grep $someVar Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. $ grep -ir "Something Here" * | grep "$someVar" <<Here it returns all rows with "someVar", not only those with "$someVar">> 我看不到告诉grep不要将字符串解释为正则表达式的选项,而是包含$为另一个字符串字符。