LS – How to List *.tar.gz Files One Filename Per Line

ls

I am trying to list every .tar.gz file, only using the following command:

ls *.tar.gz -l

…It shows me the following list:

-rw-rw-r-- 1 osm osm  949 Nov 27 16:17 file1.tar.gz
-rw-rw-r-- 1 osm osm  949 Nov 27 16:17 file2.tar.gz

However, I just need to list it this way:

file1.tar.gz 
file2.tar.gz

and also not:

file1.tar.gz file2.tar.gz

How is this "properly" done?

Best Answer

The -1 option (the digit “one”, not lower-case “L”) will list one file per line with no other information:

ls -1 -- *.tar.gz