![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux command
文章平均质量分 69
mzhan017
小张
展开
-
dnf: 错误: conflicts with file from package, mis-match of libstdc++ version
原本机器上安装的64位的libstdc++是8.4, 要安装 8.5 的 32位的为什么报这个错误。这个错误也是比较的不明确。原创 2023-11-02 13:04:28 · 189 阅读 · 0 评论 -
Linux:command: supermin
supermin,超级小的,比如超级小的系统启动镜像。appliance,翻译为设施程序。比如一个简单的虚拟机启动的启动镜像,或者是构建这些系统程序的supermin程序。supermin包含有足够的信息来,构建一个与当前主机操作系统相同的设施程序。因为主机和设施程序共享很多相同的文件,例如/bin/bash 和/lib/libc.so,所以没有必要将这些文件放到在设施程序包里。当这个设施程序启动时,如果用到了这些文件,直接可以访问主机上的文件。原创 2023-02-08 21:47:57 · 382 阅读 · 1 评论 -
shell: sh 和ksh的不同
标准错误输出到文件的dup;标准输出到文件的dup。原创 2023-01-13 13:00:34 · 1105 阅读 · 0 评论 -
rpm: 的一个问题
就是无法查看当前软件的configure配置选项https://unix.stackexchange.com/questions/134914/how-do-i-determine-which-configuration-options-an-rpm-package-is-built-with这里有一些讨论;看着如果存放到rpm里,看着有些选项不太可能;在网上找了找,也没有找到具体怎么查看。有些软件已经实现将configure 配置放到 -v选项;再有一些,需要下载rpm版的源文件,根据spec文件原创 2022-12-04 21:39:12 · 103 阅读 · 0 评论 -
Kernel: module接口ABI相关问题分析的思路;__GENKSYMS__;
但是为什么RHEL里还要留着,而且需要特殊的宏。增加了看代码的不畅快感。下面这个commit给genksyms 添加了 -T选项,会将module使用的相关接口符号,连同类型定义(-T type)一块导出到一个文件,方便版本之间做接口对比。最近看RHEL的代码发现有好多跟这个__GENKSYMS__相关的代码。但是从Kernel的git源码里搜确没搜出几个。其实Redhat这种方式有点取巧了。可能是为了避免某些个问题?这个工具的源码再kernel源码里,需要自己build出来。原创 2022-11-10 06:37:52 · 379 阅读 · 0 评论 -
Linux: audit;如何知道有哪一个程序访问了某个文件? auditctl
就是使用systemtap提高的功能,监听具体的文件操作函数。第二个方法,需要准备相应的脚本,编译环境,有些麻烦。第一个放到,使用audit,这个比较方便使用;如何知道有哪一个程序访问了某个文件?原创 2022-10-23 21:15:33 · 346 阅读 · 0 评论 -
开源:openldap变化,兼容
这里提到一个slapcat工具,这里可以指定具体换行时的字符个数,在测试时发现,给了30,出来确实32。一路追下来,还是openldap设计的问题。看了以下openldap的源码,感觉怪怪的,多参数函数,比比皆是。这个bug提到了一个LDIF_KLUDGE,说这个可用去除掉了,这样做的好处是什么?这个commit,没有提示为什么将者ldif的长度从76改成78。从而导致默认行为的变更;如果有应用程序依赖这个76的长度,就容易导致问题。gcc 选项,可以将错误,警告的输出每行按照固定长度大约。原创 2022-10-03 17:06:14 · 423 阅读 · 0 评论 -
Linux: reboot:shutdown: systemctl
Linux 重启过程原创 2022-09-24 15:37:49 · 723 阅读 · 0 评论 -
Linux: 特殊文件名文件删除
特殊文件名文件删除原创 2022-08-29 11:33:38 · 721 阅读 · 0 评论 -
Linux: 命令:echo
echo 简介原创 2022-06-25 19:42:29 · 346 阅读 · 0 评论 -
ip 命令示例
linkip link help;ip link add link eth12 type vlan id 1// zip link add link eth12 name eth12.1 type vlan protocol 802.1Q id 3 // 添加name 是eth12.1 的 link/ vlan id 是3;启动link:ip link set dev eth8.1 up设置MTU: ip link set dev eth0 mtu 1400运行时查看:/proc/sy原创 2020-08-15 05:46:20 · 1357 阅读 · 0 评论 -
[Linux]find
find ./ -type f -mtime -1 -print /// -1 这里是1天内做修改的文件find . -name *md 2>/dev/null | awk -F/ ‘{ print $3, $4}’ | uniq| sortfind / -type f -size +3M -print0 | xargs -0 ls -lfind . -name abcfind . -type f -newer uninstall.cmake //// 这个可以用来找当前目录下比这个un原创 2020-09-27 11:07:37 · 178 阅读 · 0 评论 -
Kernel: route table id: RT_TABLE_COMPAT
这个看着是系统预留做老版本兼容的table id。那我们现在到底能不能用这个id。首先要看这个函数怎么使用fib_dump_info。$ git show 709772e6e0656commit 709772e6e06564ed94ba740de70185ac3d792773Author: Krzysztof Piotr Oledzki <ole@ans.pl>Date: Tue Jun 10 15:44:49 2008 -0700 net: Fix routing ta原创 2022-02-18 08:00:00 · 444 阅读 · 0 评论 -
Linux: 命令:chrt
文章目录归属错误解决归属[root@vmtca-2003 test]# rpm -qf /usr/bin/chrtutil-linux-2.32.1-17.el8.x86_64错误chrt -f 41 ./loopchrt: failed to set pid 0’s policy: Operation not permitted这个错误的原因是,给pid 0 设置调度规则是不允许的。为什么给pid 0 设置 policy。strace chrt -f 41 ./loopopenat(AT原创 2022-02-15 22:19:16 · 971 阅读 · 0 评论 -
Linux: grub
修改cmdlineedit (your favorite editor) /etc/default/grubadd “nox2apic” to the GRUB_CMDLINE_LINUX line if the file, e.g.GRUB_CMDLINE_LINUX=“console=ttyS0,115200n81 console=tty0 crashkernel=128M@0 intremap=off panic=10 edd=off shelf=0 slot=9 idle=mwait原创 2022-02-14 17:18:56 · 286 阅读 · 1 评论 -
Linux:signal:ptrace event 跟踪信号
设置过滤器A filter for an individual event is set by writing a filter expression to the ‘filter’ file for the given event.For example::# cd /sys/kernel/debug/tracing/events/sched/sched_wakeup# echo “common_preempt_count > 4” > filterA slightly more i原创 2022-01-07 08:32:11 · 318 阅读 · 0 评论 -
Linux:initrd:dracut, dracut-pre-udev; initramfs启动
文章目录参考命令示例dracut shell怎样创建initrd错误dracut Warning: LVM rootvg/rootlv not found参考https://dracut.wiki.kernel.org/index.php/Main_Page这个dracut,是一个地名,引入的这个工具名称。作用是创建启动使用的内存文件系统。是使用已有(当前)系统里的文件,包括必要的工具、文件,打包出一个启动内存文件系统。redhat 升级到8之后,没有了 /sbin/new-kernel-pkg,原创 2021-12-14 07:36:46 · 1287 阅读 · 3 评论 -
Linux: security: Selinux
配置/sys/fs/selinux/Disabled/etc/selinux/configis file controls the state of SELinux on the system.#SELINUX= can take one of these three values:#enforcing - SELinux security policy is enforced.#permissive - SELinux prints warnings instead of enforcing.原创 2021-11-29 21:50:33 · 957 阅读 · 0 评论 -
Linux:IPC:共享内存使用注意点; shm_open
如果两个进程公用的共享内存,对应的数据结构发生变化,就需要对两个线程同时做编译,替换程序,不然,会出现“奇怪”的现象,比如,明明这个值在A线程设置了是3,但是到了线程B读出来就是个2.这是一个潜意识的问题。需要有这种潜意识在里面。......原创 2021-11-29 18:30:00 · 810 阅读 · 0 评论 -
util-linux:lscpu
文章目录lscpubogoMIPSlscpu[root@rhel-cleanmodules ~]# lscpuArchitecture: x86_64CPU op-mode(s): 32-bit, 64-bitByte Order: Little EndianCPU(s): 1On-line CPU(s) list: 0Thread(s) per core: 1Core(s) per socket: 1Socket(原创 2021-10-14 20:58:16 · 138 阅读 · 0 评论 -
Perl: 使用总结
文章目录参考实例h hdebug 单步调试添加断点 c;Ts [expr]n [expr] 回车rwatch参考https://perldoc.perl.org/perldebug#:~:text=In%20Perl%2C%20the%20debugger%20is%20not%20a%20separate,correctly%20for%20the%20debugger%20to%20work%20on%20it.实例h h打印信息的帮着信息debug 单步调试添加断点 c;c [line原创 2021-09-22 17:08:10 · 253 阅读 · 0 评论 -
Linux:网卡/网桥配置文件 ifcfg-***
文章目录参考文件路径样例网桥脚本参考https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-networkscripts-interfaceshttps://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/index文件路径/etc/s原创 2021-07-19 16:45:49 · 734 阅读 · 0 评论 -
Linux:cron job crontab
cronie 总结原创 2021-07-03 17:04:44 · 180 阅读 · 0 评论 -
Redhat:fapolicyd 问题分析
参考https://bugzilla.redhat.com/show_bug.cgi?id=1897091fapolicyd-0.9.1-4.el8_2.2 → fapolicyd-0.9.1-4.el8_2.3https://access.redhat.com/errata/RHBA-2020:5243源码https://github.com/linux-application-whitelisting/fapolicyd/pull/97/commits为什么?在升级时,kernel会将升级原创 2021-06-19 16:23:16 · 310 阅读 · 0 评论 -
Linux: sysctl 及 sysctl 配置选项说明
带有非法地址的包,称为martians 包,火星包。原创 2021-06-16 15:33:23 · 877 阅读 · 1 评论 -
Linux:scp
scp 错误总结原创 2021-06-10 13:42:13 · 985 阅读 · 0 评论 -
Linux:sed
sed命令的使用示例原创 2021-03-16 17:28:48 · 120 阅读 · 0 评论 -
Linux: chmod
chmod的使用实践原创 2021-02-01 15:37:13 · 249 阅读 · 0 评论 -
Linux: patch/diff
patch与diff的使用patch_command=‘patch -p1 -F1 -s’ **-pnum** or --strip=num ///prefix number Strip the smallest **prefix containing num** leading slashes from each file name found in the patch file. A sequence of one or more原创 2021-01-28 09:30:33 · 250 阅读 · 1 评论 -
Linux: ptrace 错误 EIO
在新的redhat8 出现EIO错误。https://man7.org/linux/man-pages/man2/ptrace.2.html这个错误的原是:EIO request is invalid, or an attempt was made to read from or write to an invalid area in the tracer’s or the tracee’s memory, or there was a word-alignment violation, or原创 2020-12-29 11:22:34 · 694 阅读 · 0 评论 -
grep: 实例
linux grep 命令使用总结原创 2020-12-22 16:03:10 · 219 阅读 · 0 评论