tmp

 

sed -n '1,3p' file
表示 取文件 第一行到 第3行的内容;

在匹配行前一行、后一行添加新行

前一行:

sed -i '/target string/istring line want to add' $input_file   #target string不需要是目标行完整字串,取其一部分即可

后一行:

sed -i '/target string/astring line want to add' $input_file

使用modprobe挂载.ko模块可以从cmdline中获取参数

modprobe工具必须支持从/proc/cmdline读取字符串,并通过格式(模块名).(变量名)=(值)过滤出参数

linux man web site

https://linux.die.net/man/

git push unpacker error

具体提示error如下:

error: remote unpack failed: error Pack exceeds the limit of 104,857,600 bytes, rejecting the pack

 

在此repo下执行git remote update再push即可

 

libc/llvm/linux code browser

https://codebrowser.dev/

https://codebrowser.dev/glibc/glibc/nptl/pthread_mutex_timedlock.c.html

 

查看elf文件里数据段里某个变量前后变量是什么

 readelf -s libxxx.so |grep OBJECT |sort -k2 |grep gteecmutex -i -A 5 -B 5

 

ptrace BRK handler log

[20221101_16:32:00:280][ 163.450371][ T1626] Internal error: ptrace BRK handler: f20003e8 [#1] PREEMPT SMP

上面log中f20003e8是ESR,#1是die counter:

static int __die(const char *str, int err, struct pt_regs *regs)
{
    static int die_counter;
    int ret;

    pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
         str, err, ++die_counter);

over-provisioning-nand-based-ssds-better-endurance-whitepaper

https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/over-provisioning-nand-based-ssds-better-endurance-whitepaper.pdf

 

Linux查看目录的大小方法

du -sh dirname    #-s 仅显示总计

 

posted @ 2022-09-24 11:40  aspirs  阅读(277)  评论(0编辑  收藏  举报