Try the following:
#blkid -o value -s TYPE /dev/sda1 ext4
Or, for mounted partitions:
df -T Filesystem Type 1K-blocks Used Available Use% Mounted on rootfs rootfs 20026236 20009848 0 100% / /dev/root ext4 20026236 20009848 0 100% / devtmpfs devtmpfs 1010720 0 1010720 0% /dev tmpfs tmpfs 202252 212 202040 1% /run tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 509140 0 509140 0% /dev/shm /dev/sda2 ext4 459913320 71736 436456292 1% /home
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.