? and * not working

saiganesh@LAPTOP-EJBON1NM ~
$ ls -l
total 3
-rwxrwxrw- 1 saiganesh None 5 Jan 14 21:54 test.file
-rw-r--r-- 1 saiganesh None 0 Jan 14 21:54 test2.file
-rw-r---wx 1 saiganesh None 3 Jan 14 23:02 test3.file
-rw-r--r-- 1 saiganesh None 3 Jan 14 23:04 test4.txt

saiganesh@LAPTOP-EJBON1NM ~
$ ls *.txt
test4.txt

saiganesh@LAPTOP-EJBON1NM ~
$ ls *.file
test.file  test2.file  test3.file

saiganesh@LAPTOP-EJBON1NM ~
$ ls ?.file
ls: cannot access '?.file': No such file or directory

saiganesh@LAPTOP-EJBON1NM ~
[b]$ ls ?.fil*
ls: cannot access '?.fil*': No such file or directory
[/b]
saiganesh@LAPTOP-EJBON1NM ~
$ ls ?est.fil*
test.file

saiganesh@LAPTOP-EJBON1NM ~
$ ls ?est*.fil*
test.file  test2.file  test3.file

saiganesh@LAPTOP-EJBON1NM ~
$

Open in new window


i wonder why above highlighted one not working
please advise
LVL 7
gudii9Asked:
Who is Participating?
 
Abhimanyu SuriSr Database EngineerCommented:
/home$ ls *.txt
abc.txt		abc1.txt	abc_new.txt	logfile.txt	match.txt	new.txt		nodes.txt	testloop.txt
/home$ ls ?.txt
ls: ?.txt: No such file or directory
/home$ touch a.txt
/home$ ls *.txt
a.txt		abc.txt		abc1.txt	abc_new.txt	logfile.txt	match.txt	new.txt		nodes.txt	testloop.txt
/home$ ls ?.txt
a.txt
/home$ ls ?*.txt
a.txt		abc.txt		abc1.txt	abc_new.txt	logfile.txt	match.txt	new.txt		nodes.txt	testloop.txt

Open in new window

0
 
ozoCommented:
I don't see that you have any file who's name is a single character followed by .file, which is what would match ?.file
0
 
Joy DingenenICT system consultantCommented:
off-topic
Looking at the amount of questions you have put up in the last few hours i would advise you read up a bit first on how to use linux.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.