Gabriel
  • Member for 9 years, 1 month
  • Last seen more than a month ago
What's the difference between pkill and killall?
17 votes

pkill is the one that's worth teaching future generations, both because of the filters you mention and the fact that it's paired with the highly reusable pgrep. They kill processes the same way, and ...

View answer
Are there any deduplication scripts that use btrfs CoW as dedup?
Accepted answer
17 votes

I wrote bedup for this purpose. It combines incremental btree scanning with CoW-deduplication. Best used with Linux 3.6, where you can run: sudo bedup dedup

View answer
Can someone explain the different types of unix domain sockets?
Accepted answer
12 votes

These are abstract sockets, that live outside the filesystem namespace. netstat --unix, lsof -U and other commands print an @ sign instead of the nul byte that's at the start of the pathname.

View answer
Why can't a regular user delete a btrfs subvolume
5 votes

Deleting a subvolume allows someone to unlink files that they do not own. In my opinion, the files a privileged user writes in a location chosen by a less privileged user are fair game, but the person ...

View answer
List all the ways a block device is in use
5 votes

If you are able to open a block device O_EXCL, it isn't in use by the kernel (O_EXCL takes a device lock in this particular case). lsof (/proc scanning) should find any other users (VMs might have the ...

View answer
Is there kernel patch to prevent load files into RAM for LiveCD?
2 votes

On some embedded architectures, the kernel supports execute in-place (XIP). It's not appropriate for LiveCDs, because these use squashfs and union mounts, and you need a decompressed copy of the data. ...

View answer
BCache and disk encryption
2 votes

I've put a quick intro to bcache conversion on AskUbuntu. You can use lsblk to figure out which stacked device to convert, which should be the partition that contains LUKS data.

View answer
Can the UNIX command tree display only directories matching a pattern?
1 votes

You could use my arbo command. Install with: ln -s "$PWD"/arbo.py ~/bin/arbo Now you can do: find tstdir -maxdepth 1 -iname '*qm*' |arbo --color The output looks something like this, with the same ...

View answer
How are filesystem snapshots different from simply making a copy of the files?
0 votes

The main difference between a snapshot and a copy with cp -a --reflink to the same filesystem is that the snapshot is much faster (near instantaneous); performance doesn't depend on how many files ...

View answer
Linux on Hard Drive Partition, Bootloader on USB Flash Drive
0 votes

Two things: could you wipe the usb key first? I'm getting the impression a laconic "read error" message comes from older versions of grub. Have you checked the contents of your grub.cfg? ...

View answer
How can I defragment my SSD on linux?
0 votes

Fragmentation is bad for SSDs because it causes write amplification (SSDs need to copy entire erase blocks for much smaller writes; recent low-quality SSDs can go up to 2MB erase blocks). ...

View answer
how to share environment variables between shells like globals related to a master pid?
0 votes

Taking into account your comments, that you want basic IPC between shell scripts. I would just write to files (with a rename for atomicity) varf=$(mktemp ./myvars.XXXXXX) echo myvar=newval > $...

View answer