Skip to main content
108 votes

linux: How can I view all UUIDs for all available disks on my system?

The best command to use is lsblk -f. It will list all the devices and partitions, how they are mounted (if at all) and the tree structure of the devices in the case of using LVM, crypto_LUKS, or ...
John Rea's user avatar
  • 1,081
45 votes
Accepted

Why is sync so important when making a bootable linux usb stick?

The dd does not bypass the kernel disk caches when it writes to a device, so some part of data may be not written yet to the USB stick upon dd completion. If you unplug your USB stick at that moment, ...
Serge's user avatar
  • 8,651
36 votes
Accepted

snap /dev/loop at 100% utilization -- no free space

No, having Snap images which consume 100% of their filesystem is perfectly acceptable. In fact, it's supposed to work that way. A snap is a squashfs file carrying content and a bit of metadata that ...
Emmanuel Rosa's user avatar
27 votes

linux: How can I view all UUIDs for all available disks on my system?

To only get the UUID of a specific disk device (for example to be used in a script) you can use: sudo blkid -s UUID -o value /dev/sdXY where /dev/sdXY is the name of the device.
Strahinja Kustudic's user avatar
25 votes
Accepted

Best way to delete large amount of files by date

If the files are not modified after initial creation, you could delete if they have not been modified in over 90 days: find /path/to/folder ! -type d -mtime +90 -delete or find /path/to/folder ! -...
user4556274's user avatar
  • 9,065
19 votes

Check data integrity after copying thousands of files

Using MD5 sums is a good way, but the canonical way to use it is: cd to the directory of the source files and issue: md5sum * >/path/to/the/checksumfile.md5 If you have directories with many ...
xenoid's user avatar
  • 9,068
19 votes
Accepted

Is my drive failing and is this the same reason my laptop is running slower?

Yes, your drive is failing: 5 Reallocated_Sector_Ct 0x0033 001 001 005 Pre-fail Always FAILING_NOW 9800 There’s nothing you can do to make the drive “better”. What you need to do next ...
Stephen Kitt's user avatar
18 votes

How do I check TRIM?

Try lsblk -D TRIM/discard is available, if the DISC-MAX column is not 0B Example (SSD/trim available) [root@foo bar]# lsblk -D NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO sda 0 4K ...
beck's user avatar
  • 181
18 votes

linux: How can I view all UUIDs for all available disks on my system?

lsblk -o +uuid,name You can see all the outputs that can be added to the -o (--output) with lsblk --help Also this will do the job # blkid
Nico Rodsevich's user avatar
15 votes

Persistent disk name /dev/sd'x', changing with almost every reboot

/dev/sdX has not been a stable identifier for a drive for a very long time (and indeed probably never was). Those are allocated in the order they're discovered, and different controllers are probed in ...
derobert's user avatar
  • 111k
14 votes
Accepted

Check data integrity after copying thousands of files

Unmount, eject, and remount the device. Then use diff -r source destination In case you used rsync to do the copy, rsync -n -c might be very convenient, and it is nearly as good as diff. It doesn'...
sourcejedi's user avatar
  • 51.4k
12 votes
Accepted

Inaccessable partition with 477GB

nvme0n1 is not a partition, it is an entire disk: "NVMe controller #0, namespace #1". Unless you have some serious enterprise hardware, your NVMe disks have only a single namespace on them. ...
telcoM's user avatar
  • 103k
11 votes
Accepted

Convert a single-drive LVM volume to a striped volume across 3 drives

I finally found a trick way. The setup: Let's say our original drive is /dev/sda (PV is /dev/sda1) and our two new drives are /dev/sdb and /dev/sdc. All drives are 100 MB big. The idea: Because all ...
Totor's user avatar
  • 20.4k
11 votes
Accepted

persistent device naming for NVMe storage devices

Short: No. You can not rely on the name of the descriptor. And you most likely never will. The NVMe naming standard describes: nvme0: first registered device's device controller nvme0n1: first ...
rohr's user avatar
  • 156
10 votes
Accepted

What is the "~/.stack" directory?

From https://docs.haskellstack.org/en/stable/GUIDE/ The stack root directory holds packages belonging to snapshots and any stack-installed versions of GHC. You can safely remove any or all of it, ...
arya's user avatar
  • 236
9 votes
Accepted

tmpfs usage and resizing

Now, from what I read the tmpfs doesn't take physical storage, but uses the virtual memory of the machine. Is it correct? Correct. tmpfs appears as a mounted file system, but it's stored in volatile ...
klerk's user avatar
  • 2,859
8 votes

Clear unused space with zeros (btrfs)

The correct and "smart" way to clear the free space is using: fstrim /mountpoint Use this on a mounted filesystem. It's important to note that there is no security advantage to this. If you wish to ...
DustWolf's user avatar
  • 224
8 votes

Check data integrity after copying thousands of files

rsync -rc original-dir/ copied-dir/ -c causes rsync to compare files by MD5 checksum (without it, it normally uses only the timestamp and size for quicker comparisons). This will also cause rsync to ...
JoL's user avatar
  • 4,835
8 votes

Replicating an SD card

If you're just looking to copy an SD card exactly from one to another then you can do so with dd on the command line. You should NOT do this from your raspberry pi from it's own OS. This is because ...
Philip Couling's user avatar
7 votes
Accepted

Is it true that rsync does not handle "File renames" gracefully?

There is no mechanism for rsync to track renames as it does not maintain state other than while it is running. If you rename /test/10GBfile to /test/10GBfile_newname on the source computer, then by ...
Chris Davies's user avatar
6 votes
Accepted

why resize a PV instead of adding a new PV?

Summary: From a purely technical standpoint, it doesn't make much difference, but resizing is better. Once you add in practical aspects, adding a new partition is a clear winner. From a strictly ...
derobert's user avatar
  • 111k
6 votes
Accepted

df command shows 100% full, even after deleting files it shows same usage (100%)

A reboot and re-mount would solve the problem I believe. Reason: The reason behind this is that df utilize statfs(2) system call to get the File system stat. What it means that it checks open kernel ...
arif's user avatar
  • 1,499
6 votes

How to make journald increase logs storage capacity?

It's necessary to setup SystemMaxUse=100G e.g.
4xy's user avatar
  • 245
6 votes
Accepted

Report how much space is used and available in storage in ZFS on FreeBSD

zfs list Use the list option on the zfs command built into FreeBSD. zfs list Example: $ zfs list NAME USED AVAIL REFER MOUNTPOINT zroot 4.41G 17.4G 88K none ...
Basil Bourque's user avatar
5 votes
Accepted

In which file does Chromium store session storage data of the HTML5 webstorage

https://www.google.co.uk/search?q=leveldb%20log https://www.quora.com/Why-does-a-LevelDB-database-use-a-directory-instead-of-a-single-file New writes are first appended to a binary log file and ...
sourcejedi's user avatar
  • 51.4k
5 votes

Why is there no lost+found directory in storage pool?

lost+found is a directory typically created when a mountpoint gets formatted with a standard Linux filesystem, like ext. I haven't played much with XFS, but afaik lost+found is specific to the fsck ...
dyasny's user avatar
  • 1,164
5 votes
Accepted

Mirror Linux disk writes to secondary disk

You can use a MD RAID1 with the option --write-mostly. subsequent devices listed in a --build, --create, or --add command will be flagged as 'write-mostly'. This is valid for RAID1 only and means ...
RalfFriedl's user avatar
  • 9,089
5 votes

Check data integrity after copying thousands of files

Along with the other fine answers above, I would like to also recommend considering hashdeep, from http://md5deep.sourceforge.net/. It has a good sized userbase in the scientific community, where they ...
don bright's user avatar
5 votes

Is it true that rsync does not handle "File renames" gracefully?

--fuzzy has already been answered but there is another interesting hack involving hard links. After the first transfer $ rsync -avHP --delete-after ~/family/Photos remotebox:backups You create a hard ...
laktak's user avatar
  • 6,084
5 votes
Accepted

why is the internal storage mmc and not sd?

/dev/sdX indeed once meant SCSI disk, but nowadays it covers anything with a SCSI-like interface, including SATA, USB storage and even old PATA when libata drivers are used. Some actually have ...
telcoM's user avatar
  • 103k

Only top scored, non community-wiki answers of a minimum length are eligible