Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-10-2004, 04:10 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
Ned some help with commands

I have a few questions I need input on. One can a linux file contain the *.
example would be ale*.tar .

Is the correct syntax to list a file that end in 2-4 (i.e. text.2 and also older than 20 days, in /usr/temp

find /usr/temp -name '*.2-4' -mtime 20 ?

and if I wanted to ls the output what would the entire command be? Thanks for any help.

Old 03-10-2004, 04:26 PM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I think find's manpage will give you all the information you'll need...if you don't know, in terminal do

man find
and if you wish to put the output given by find to another program, just pipe if you'd want to get all the output of find to be printed through "less", just do

find <whatever the options> | less
but what do you do with ls? mm...shouldn't find <options> print out all what it finds, like "ls" prints the contents of a directory? or did you mean, that from ls's output, find the things you want? in this case, do it this way:

ls <options-for-ls> | find <options-for-find>
where <options-for-ls> and <options-for-find> are naturally the command line switches and other things you wish to give (like ls -d which prevents the printing of the contents of the possible directories that are it only prints file- and folder names, but not the files/folders that are possibly inside them)

Last edited by b0uncer; 03-10-2004 at 04:28 PM.
Old 03-10-2004, 04:43 PM   #3
LQ Newbie
Registered: Mar 2004
Location: boston, ma
Posts: 4

Rep: Reputation: 0


I am not sure if linux commands will be diff than sun unix on find command.

I use double quot "*.2-4" instead of single ' ' for the filename u r searching

good luck


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
ut2004 demo help! ned to install ddlinux Linux - Games 1 03-05-2005 02:00 PM
NED editor help vgulch Linux - Software 0 12-23-2004 03:08 AM
new to linux ned some help dieseltech Linux - Software 7 10-13-2004 04:59 PM
is Optorite DD0201 DVDR supported under mdk 9.2+, if so, anything speciial i ned 2 no radishpox Mandriva 1 04-11-2004 12:48 AM
Ned help with apache. Z28kid Linux - Newbie 2 02-16-2003 04:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 AM.

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