/images/avatar.jpg
杂七杂八的,随手记录。

Bash Mapfile Builtin Command Help and Examples

本文为摘录(或转载),侵删,原文为: https://www.computerhope.com/unix/bash/mapfile.htm

1 语法

1
2
mapfile [-n count] [-O origin] [-s count] [-t] [-u fd]
        [-C callback [-c quantum]] [array]

1.1 选项

mapfile 内建命令接受以下选项:

git tips

  • To list untracked files

    1
    
    git ls-files --others --exclude-standard
    

    If you need to pipe the output to xargs, it is wise to mind white spaces using git ls-files -z and xargs -0:

    1
    
    git ls-files -z -o --exclude-standard | xargs -0 git add
    

    Nice alias for adding untracked files:

    1
    
    au = !git add $(git ls-files -o --exclude-standard)
    
  • Delete untracked files:

    1
    
    git clean -dfx
    

Spans, string_view, and Ranges - Four View types (C++17 to C++23) - C++ Stories

本文为摘录(或转载),侵删,原文为: https://www.cppstories.com/2023/four-views-in-cpp23/

在本博客文章中,我们将探讨现代 C++中引入的几种不同的视图/引用类型。第一种是 C++17 中新增的 string_view 。 C++20 引入了 std::spanranges 视图。最后新增的是来自 C++23 的 std::mdspan

随笔: GOT S1

十一哪里也去不了,躲在家里重新刷一遍权力的游戏 (Game of Throne, GOT),今天看了第一季。很久没有写过随笔之类的了,今天顺手写下点东西,发泄感慨和牢骚。

Linux Rootkits — Multiple ways to hook syscall(s)

本文为摘录(或转载),侵删,原文为: https://foxtrot-sq.medium.com/linux-rootkits-multiple-ways-to-hook-syscall-s-7001cc02a1e6

我们所见到的大多数恶意软件攻击中使用的 rootkit 都是开源的,其行为几乎与在系统中运行的正常进程相同(隐藏和挂钩)。从行为上来看,它们与正常进程几乎没有任何区别。在本文中,我们将探讨一些现有的方法,根据不同的 Linux 内核版本来挂钩系统调用。