LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2011, 11:25 AM   #1
loukas texasll
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
fedora linux-wildcard commands


hello my name is loukas!
and i would like to ask if anybody know how can i use ls with wildcards to list all files that end in a between numbers?
 
Old 11-27-2011, 07:15 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,132
Blog Entries: 14

Rep: Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068Reputation: 3068
Assuming that you are talking about a file name such as 1somethingorother2.something, normal wildcards such as * and ? should work.

Code:
$ ls 1*2.txt
1and2.txt  1somethingorother2.txt
$ ls 1???2.txt
1and2.txt
$ ls *1*2*.*
1and2.txt
1somethingorother2.txt
joe1somethingorother2more.txt
joe1somethingorother2.txt
For something more complicated, you may need to use regular expressions. See man regex for more, then Google for links to make the man page understandable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 06:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM


All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration