LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2005, 08:15 PM   #1
shole
LQ Newbie
 
Registered: Nov 2003
Location: KL, M'sia
Distribution: FC3 on P!!!1G 512MB RAM
Posts: 27

Rep: Reputation: 15
Talking Equivalen dir /s [DOS] command


i m going through my rd9 cds for a particular rpm.
is there an equivalent dir /s [DOS] command in linux
i have gone through the ls man page but i did not see any resemblence

i know this must have been ask a million times, but i did i search in da forum n did not find any ???

tq tq tq
 
Old 01-13-2005, 09:36 PM   #2
Superme
Member
 
Registered: Jul 2004
Location: Smiths Falls Ontario (near ottawa [our capital])
Distribution: slackware 9.1, redhat 9.0, PHLAK, SuSE 9.0Pro windows XP (HEAVILY MODIFIED)
Posts: 111

Rep: Reputation: 15
I know that dir works in console for linux but im not sure about the swith your using, in dos for dir i would type dir /p to scroll by the page and i havent figured out what command makes it do dir by the page maybe somone more learned would know
 
Old 01-13-2005, 09:54 PM   #3
mwales
LQ Newbie
 
Registered: Jan 2005
Location: Grant, FL
Distribution: Mandrake 10 and FC4-64
Posts: 19

Rep: Reputation: 0
To do a recursive directory listing like dir /s try the following: ls -Rl (case sensitive)

To stop a listing after each page, do the following: ls | more (the | is a pipe, use shift + \)
 
Old 01-14-2005, 12:33 AM   #4
shole
LQ Newbie
 
Registered: Nov 2003
Location: KL, M'sia
Distribution: FC3 on P!!!1G 512MB RAM
Posts: 27

Original Poster
Rep: Reputation: 15
wat i m tryin to do is a search for all of the *.rpm/other files on my hdd
i will normally do a "dir /s *.bat" to list out all the *.bat files in the current dir and subdir

i tried using "ls -Rl *.rpm" but it does not work????

[root@cactuar /]# ls -Rl *.rpm
ls: *.rpm: No such file or directory




Last edited by shole; 01-14-2005 at 12:34 AM.
 
Old 01-14-2005, 12:43 AM   #5
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
well i did ls *gif and it showed just the gif files. I don't understand what your trying to accomplish with the RI options. i don't see any of those options when i do man ls. So try just doing ls *rpm. I think what your doing is that ls is thiking your looking for -RI in a directory labeled *.rpm.

also if your looking for the rpms cuz you want to know what you have installed you can just do
rpm -qa
and that will list all the rpms you have installed. Or if you want to check for a specific program to see if it is installed you can do rpm -qa | grep "programname"

Last edited by dr_zayus69; 01-14-2005 at 12:58 AM.
 
Old 01-14-2005, 01:46 AM   #6
shole
LQ Newbie
 
Registered: Nov 2003
Location: KL, M'sia
Distribution: FC3 on P!!!1G 512MB RAM
Posts: 27

Original Poster
Rep: Reputation: 15
wat i m tryin to do is jus list out all the files that ends with *.sh
it will search through the current dir and all the subdir and finally list out all the files that ends with .sh
 
Old 01-14-2005, 02:03 AM   #7
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
well then i think you can do ls -R / | grep *.sh to do the trick. Correct me if im wrong and someone knows a better way.
 
Old 01-14-2005, 03:29 AM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Also
Code:
find /path/to/dir -iregex ".*\.sh"
or
Code:
find -iregex ".*\.sh"
if you're already in the right directory.
 
Old 01-14-2005, 03:39 AM   #9
shole
LQ Newbie
 
Registered: Nov 2003
Location: KL, M'sia
Distribution: FC3 on P!!!1G 512MB RAM
Posts: 27

Original Poster
Rep: Reputation: 15
yeah tat did the trick

Quote:
find /path/to/dir -iregex ".*\.sh"
thanx a million
 
  


Reply



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
equivalent of DOS command /p TranceDude Linux - Software 6 08-12-2005 11:49 PM
deltree command in Dos, what is it in Linux? TruongAn Linux - Software 1 06-10-2005 08:06 AM
dos and lin command line rootyard General 4 08-01-2004 10:16 AM
Wine & DOS command chii-chan Linux - Software 8 10-14-2003 09:50 PM
no dir command shanenin Slackware 8 10-09-2003 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

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
Open Source Consulting | Domain Registration