1.只查询A表中a、b两字段 db.A.find( {"stage":2,"workStatus":1},//第一个大括号表示查询条件 {"a":1,"b":1}//第二个大括号中字段值为1的表示要显示这些字段 ) 2.不显示a字段,其他字段全显示 db.A.find( {"stage":2,"wo ...
分类:
数据库 时间:
2020-09-17 23:02:49
阅读次数:
39
1、统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来。cat/etc/passwd|grep-c"/sbin/nologin";cat/etc/passwd|grep"/sbin/nologin"|cut-d:-f12、查出用户UID最大值的用户名、UID及shell类型。cut-d:-f1,3,
分类:
其他好文 时间:
2020-09-17 22:32:47
阅读次数:
25
[root@localhost dpdk-19.11]# cat /proc/meminfo | grep -i huge AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_ ...
分类:
其他好文 时间:
2020-09-17 22:10:17
阅读次数:
29
Hadoop环境搭建 #### 安装前准备 查看防火墙状态,若处于激活(inaction)状态,关闭防火墙 sudo ufw status 查看时间服务器是否运行,若NTP尚未安装就运行安装命令 dpkg -l | grep ntp #检查是否安装 apt-get install ntp #NTP安 ...
分类:
其他好文 时间:
2020-09-17 21:43:01
阅读次数:
32
备份复制特定以开头的目录下的文件,并查看结果 ls /usr/local/apache-tomcat-*/conf/catalina.properties|xargs -i cp -a {} {}.bak && ll -thr /usr/local/apache-tomcat-*/conf/cata ...
分类:
其他好文 时间:
2020-09-17 21:40:06
阅读次数:
37
Problem LeetCode Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where t ...
分类:
编程语言 时间:
2020-09-17 20:29:16
阅读次数:
30
##Shell-文件操作命令、管道命令、文件编辑命令(VI) ###(1)查看当前目录下所有文件信息 格式:ls [-al] 参数:a 显示隐藏文件 l 显示文件的详细信息 (命令参数可以组合使用) ###(2)切换目录 格式:cd 要切换到的目录 cd .. 切换到上一级目录 cd ~ 当前用户所 ...
分类:
系统相关 时间:
2020-09-17 19:50:04
阅读次数:
51
import time from selenium import webdriver driver = webdriver.Chrome() driver.get("https://email.163.com") time.sleep(2) iframe = driver.find_elements ...
分类:
编程语言 时间:
2020-09-17 18:46:29
阅读次数:
27
grep,我们可以使用grep命令在文本中查找指定的字符串参数:-i不区分大小写,默认是区分的,-v显示不匹配的行,-n显示匹配行及行号-c只统计匹配的行数,-E使用扩展的egrep-w精确匹配单词-o只输出匹配的内容-Ax-Bx-Cxgrep-Ei"linux|shell"test.txt不区分大小写,同时过滤包含linux和shell的字符串grep-v"^$|#
分类:
系统相关 时间:
2020-09-17 18:36:35
阅读次数:
40