Skip to content
cheatsheet
home
/
cv
/
weblog
/
cheatsheet
/
proxy
/
vpn
/
status
/
links
EN
RU
☾
New version available
reload
×
cheatsheet
/
linux
/
Sed — replace in file
Sed — replace in file
linux
In-place global string replacement
sed -i 's/old-string/new-string/g' file.txt
⎘ copy
#linux
more linux
all 133 commands →
Sort and deduplicate
sort file.txt | uniq -c | sort -rn | head -20
List block devices
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID
Show block device UUIDs
blkid
Mount a partition
mount -t ext4 /dev/sdb1 /mnt/data
Show all mounts
findmnt --real