Results 1 to 3 of 3

Thread: Can I get a list of the file types stored on my hard drive?

  1. #1
    Join Date
    Jan 2008
    Location
    Davison, Michigan, U.S.A.
    Beans
    1,138

    Can I get a list of the file types stored on my hard drive?

    I don't want a listing of all files, I just want to know what file types are on my hard drive.

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,090
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Can I get a list of the file types stored on my hard drive?

    Code:
    find / -type f -exec file -b {} \; | sort | uniq
    find will list all files on your system, file -b will print file type. sort will sort them and uniq will make sure each type is listed only once. file may occasionally print a bit more than you want (like versions of the format or creation dates where this is stored in the file). Adding the -i option may help. Use the manuals for find, file, sort and uniq for more details.

  3. #3
    Join Date
    Jan 2008
    Location
    Davison, Michigan, U.S.A.
    Beans
    1,138

    Re: Can I get a list of the file types stored on my hard drive?

    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •