Linux View File System Type Example Method

Linux View File System Type Example Method

How to check the file system type of a partition in Linux. Here are some methods to check the file system type of a partition.

1: df -T command to view

This is the simplest command. The file system type is output in the Type column. Only mounted partitions and file system types can be viewed. As shown below:

[root@mylnx008 ~]# df -T /dev/sdb
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb xfs 315467264 4356404 311110860 2% /mysql
 
[root@mylnx008 ~]# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda2 xfs 30929148 22455300 8473848 73% /
devtmpfs devtmpfs 1746644 0 1746644 0% /dev
tmpfs tmpfs 1757220 0 1757220 0% /dev/shm
tmpfs tmpfs 1757220 24868 1732352 2% /run
tmpfs tmpfs 1757220 0 1757220 0% /sys/fs/cgroup
/dev/sda1 xfs 508580 63024 445556 13% /boot
/dev/sdc1 ext4 139203080 8699072 123409840 7% /mnt/resource
tmpfs tmpfs 351448 0 351448 0% /run/user/1000
/dev/sdb xfs 315467264 4356404 311110860 2% /mysql

2: parted -l command to view

As shown below, the parted -l command will output the file system type (File system), where the parameter l means listing the partition information of all devices.

[root@DB-Server ~]# parted -l
 
Model: ATA ST500DM002-1BD14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
 
Number Start End Size Type File system Flags
 1 32.3kB 107MB 107MB primary ext3 boot 
 2 107MB 500GB 500GB primary lvm

3: blkid command view

View the UUID and file system of the formatted partition. Use blkid to output the partition or partition's file system type, and view the TYPE field output.

[root@DB-Server ~]# blkid
/dev/mapper/VolGroup00-LogVol01: TYPE="swap" 
/dev/mapper/VolGroup00-LogVol00: UUID="1c0d5470-1503-4a18-b184-53483466d948" TYPE="ext3" 
/dev/sda1: LABEL="/boot" UUID="582b189c-396c-4da8-a7a3-1effaa3e4000" TYPE="ext3" 
/dev/VolGroup00/LogVol00: UUID="1c0d5470-1503-4a18-b184-53483466d948" TYPE="ext3" 
/dev/VolGroup00/LogVol01: TYPE="swap" 
/dev/mapper/VolGroup00-LogVol03: UUID="f037ba1e-77a1-439a-8a10-b78c3cca68ec" SEC_TYPE="ext2" TYPE="ext3" 
[root@DB-Server ~]# blkid /dev/sda1
/dev/sda1: LABEL="/boot" UUID="582b189c-396c-4da8-a7a3-1effaa3e4000" TYPE="ext3"

4: Command lsblk -f to view

Some systems may not have this command and need to be installed. Note: lsblk -f can also view the type of unmounted file systems

[root@mylnx008 ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
fd0              
sd              
├─sda1 xfs b98659b2-5f8c-493e-9304-658905ef1391 /boot
└─sda2 xfs b7559ac5-b3a4-4b00-b98a-a2a2611806d0 /
sdb xfs 6fcc5417-3c1b-4c71-aac7-344bac7654a4 /mysql
sdc              
└─sdc1 ext4 1ad7da45-2366-4c4f-acd4-484600c4153a /mnt/resource

This is the end of this article about the example method of viewing the file system type in Linux. For more relevant content about viewing the file system type in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • A detailed introduction to the Linux directory structure
  • Linux commonly used commands performance commands
  • Overview and Introduction to Linux Operating System

<<:  W3C Tutorial (2): W3C Programs

>>:  Detailed explanation of the use of CSS pointer-events attribute

Recommend

How to install FastDFS in Docker

Pull the image docker pull season/fastdfs:1.2 Sta...

Detailed explanation of the wonderful CSS attribute MASK

This article will introduce a very interesting at...

Sample code for converting video using ffmpeg command line

Before starting the main text of this article, yo...

In-depth understanding of JavaScript callback functions

Table of contents Preface Quick Review: JavaScrip...

JavaScript to implement a simple shopping form

This article shares the specific code of JavaScri...

MySQL uses events to complete scheduled tasks

Events can specify the execution of SQL code once...

A brief discussion of four commonly used storage engines in MySQL

Introduction to four commonly used MySQL engines ...

Solution to 700% CPU usage of Linux process that cannot be killed

Table of contents 1. Problem Discovery 2. View de...

Vue.js application performance optimization analysis + solution

Table of contents 1. Introduction 2. Why do we ne...

Related commands to completely uninstall nginx under ubuntu16.04

nginx Overview nginx is a free, open source, high...

Ubuntu16.04 builds php5.6 web server environment

Ubuntu 16.04 installs the PHP7.0 environment by d...

SQL Aggregation, Grouping, and Sorting

Table of contents 1. Aggregate Query 1. COUNT fun...

The unreasonable MaxIdleConns of MySQL will cause short connections

1 Background Recently, some performance issues ha...

Implementation of the login page of Vue actual combat record

Table of contents 1. Preliminary preparation 1.1 ...

Vue uses Baidu Maps to realize city positioning

This article shares the specific code of Vue usin...