English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hello. Can anyone tell me how to use the ls command to show only files with 6 characters in their file name and is of type .txt. So far I have ls -A *.txt
Someone please help!

2007-10-18 20:03:42 · 2 answers · asked by Anonymous in Computers & Internet Other - Computers

PHormali... you utter nobhead, you think I didn't check the man pages already?! wtf do you think I'm asking here if the answer was in the man pages?!

2007-10-18 22:17:57 · update #1

2 answers

* is a wild card meaning "anything"
? is a wild card meaning "1 letter"

ls ??????.txt
is your answer

or if you are more interested in learning regex (regular expressions used in many commands) then
ls *.txt | grep ^.......txt
will give you the same result.

2007-10-20 14:35:36 · answer #1 · answered by Gandalf Parker 7 · 2 0

This sounds like homework to me..... Check your man pages

man ls

2007-10-19 03:16:47 · answer #2 · answered by PHormality 3 · 0 1

fedest.com, questions and answers