display certain files ending

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

how to display a listing of all the files ending in txt using one command.

  1. Relevant commands, code, scripts, algorithms:

ls i guess i can't figure it out, basically display the ending

  1. The attempts at a solution (include all code and scripts):
    ls .txt
    ls -r .txt
    ls -la .txt

cant figure it out

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

FSU, Tallahassee, FL, USA, Prof. Rob, COP 3353

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

Hint -- Think wild card.

no clue about wild cards

Have a read though the ls section on this page:

you were almost right, if you haven't got it by now try the following:

ls -a *.txt

the -a shows hidden file as well, and the * is a wild card means anything.

so *.txt is anything that ends .txt.

1 Like