with open('./old/zce_l1.csv') as f: f_csv = csv.reader(f) headers = next(f_csv) print(headers) Row = namedtuple('Row', headers) for r in f_csv: row = Row(*r) print(row.
Read More →
The Linux kernel watchdog is used to monitor if a system is running. It is supposed to automatically reboot hanged systems due to unrecoverable software errors. The watchdog module is specific to the hardware or chip being used. Personal computer users don’t need watchdog as they can reset the system manually. However, it is useful for systems that are mission critical and need the ability to reboot themselves without human intervention.
Read More →
#得到当前脚本路径 script=`readlink -f $0` base_dir=`dirname $script` #循环该目录下所有文件 for exchange in `ls /target/sixreceiver -I mdloader` do done #生成一个uuid cat /proc/sys/kernel/random/uuid #查找不区分大小写的name并拷贝指定目录 find . -iname *config.xml -exec cp '{}' ./zx/zx \; #查看压缩包中文件 tar -vtf package.tar.gz #shell函数 func() { }
cmake . -DLUA_INCLUDE_DIR=/usr/local/include/ -DLUA_LIBRARY=/usr/local/lib/liblua.
Read More →
# 查询文件属于哪个安装包 $ rpm -qf /usr/bin/ldd # 查询某个目录、文件、模块是由哪个包提供 $ rpm -q --whatprovides /usr/bin # 查询被哪个包需要 $ rpm -q --whatrequires /usr/bin/lynx # 查询包中文件 $ rpm -qpl filename # 查询已安装文件 $ rpm -ql name # 查询配置文件 $ rpm -qpc filename $ rpm -qc name # 查询所有信息 $ rpm -qpil filename $ rpm -qil name
$ yum list name 可以看包版本 $ yum provides libselinux.so.1 libselinux-2.0.94-5.3.el6.i686 : SELinux library and simple utilities Repo : local Matched from: Other : libselinux.
Read More →
readelf -s filename nm filename |grep xxx