ILD

docker download image and save it then load to another host
2024-6-8
本机需要安装一个低版本的ubuntu 16.04,来编译toolchain,这样有好的兼容性,本机网络比较差,因此先在阿里云主机下载,然后传输image到本机,流程如下:docker有官方的镜像仓库,使用docker image pull,可以下载16.04的ubuntu。# docker imag

use pmap format print process map
2024-6-24
pmap可以打印进厂的map文件,能显示大小,比单纯的读/proc//maps显示更友好# pmap 11: init0000000000010000 876K r-xp /ram/bin/busybox00000000000fa000 4K r--p /ram/b

using vmtouch clean page cache of a file
2024-6-27
vmtouch是一个工具,统计一个文件的缓存情况,或者清楚一个文件的内核缓存。代码仓库:https://github.com/hoytech/vmtouch统计缓存情况$ vmtouch Makefile Files: 1 Directories: 0 Resident

use file check filesystem type of a partition
2024-9-24
# file -sL /dev/sdc1/dev/sdc1: BTRFS Filesystem label "nas_btrfs", sectorsize 4096, nodesize 16384, leafsize 16384, UUID=9cdc57ce-05f5-47b3-a7eb-4b1d5

blockdev command
2024-9-26
blockdev是util-linux里面的一个命令,用来通过命令行对块设备进行ioctl。blockdev - call block device ioctls from the command line用途1:报告块设备信息# blockdev --report /dev/sdcRO RA

file name length statistics under a directory
2024-11-7
下面这个结构体用来存储文件名(不包括路径)struct qstr{ union { char name_arr[31]; char *name_ptr; } __attribute__((packed));

cp --reflink option
2024-12-19
最近在使用一个cp拷贝一个26G的文件的时候,发现1s就完成了,我的硬盘绝对没有这么快的速度。测试拷贝一个1.5G的压缩包,只要0.03s就完成了:$ du -h linux-6.12.y.tar1.5G linux-6.12.y.tar$ time cp linux-6.12.y.tar a

strace print payload as hexdecimal format
2025-1-13
使用-x选项,比如:$ strace -s 1000 -x -e getxattr,setxattr setfacl -m g:user1:rwx sbgetxattr("sb", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x07\x0

--disable-nls
2025-2-7
编译util-linux的时候报错了:et.po: warning: Charset "ISO-8859-15" is not supported. msgfmt relies on iconv(), and iconv() does not support "ISO-

get hard disk serial number
2025-2-7
在nas设备上,使用lsblk发现serial为空:# lsblk --json -o NAME,MODEL,SERIAL /dev/sda{ "blockdevices": [ { "name": "sda", "model": "WDC WD40EF

Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.