Skip to main content
added link
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +

You may want to exclude paths that are beyond suspicion. The following code excludes /proc, /sys and /dev:

sudo find / -type d \( \
     \( -path /proc -prune \) -o \
     \( -path /sys -prune \) -o \
     \( -path /dev -prune \) -o \
     \( -exec sh -c '
        for d do
           btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
        done
     ' find-sh {} + \) \)

Related: How to determine which subvolume a directory/file is on?

btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +

You may want to exclude paths that are beyond suspicion. The following code excludes /proc, /sys and /dev:

sudo find / -type d \( \
     \( -path /proc -prune \) -o \
     \( -path /sys -prune \) -o \
     \( -path /dev -prune \) -o \
     \( -exec sh -c '
        for d do
           btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
        done
     ' find-sh {} + \) \)
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +

You may want to exclude paths that are beyond suspicion. The following code excludes /proc, /sys and /dev:

sudo find / -type d \( \
     \( -path /proc -prune \) -o \
     \( -path /sys -prune \) -o \
     \( -path /dev -prune \) -o \
     \( -exec sh -c '
        for d do
           btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
        done
     ' find-sh {} + \) \)

Related: How to determine which subvolume a directory/file is on?

added 444 characters in body
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +

You may want to exclude paths that are beyond suspicion. The following code excludes /proc, /sys and /dev:

sudo find / -type d \( \
     \( -path /proc -prune \) -o \
     \( -path /sys -prune \) -o \
     \( -path /dev -prune \) -o \
     \( -exec sh -c '
        for d do
           btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
        done
     ' find-sh {} + \) \)
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +

You may want to exclude paths that are beyond suspicion. The following code excludes /proc, /sys and /dev:

sudo find / -type d \( \
     \( -path /proc -prune \) -o \
     \( -path /sys -prune \) -o \
     \( -path /dev -prune \) -o \
     \( -exec sh -c '
        for d do
           btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
        done
     ' find-sh {} + \) \)
added 227 characters in body
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +
btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

btrfs subvolume show /directory/in/question

Most likely you need sudo. The command will succeed if it's a subvolume; it will fail otherwise. You can redirect output to /dev/null and rely solely on the exit status.

This will test every directory available in the directory tree:

sudo find / -type d -exec sh -c '
   for d do
      btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
   done' find-sh {} +
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129
Loading