LinuxQuestions.org
Help answer threads with 0 replies.
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 03-27-2006, 03:40 AM   #1
Ander
Member
 
Registered: Apr 2003
Location: Vancouver
Distribution: Debian
Posts: 37

Rep: Reputation: 15
'Whereis' output



Hi,
Is there a way to make the 'whereis' command show a more detailed listing, so you know which results are files and which are folders?
 
Old 03-27-2006, 04:04 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
ls -l $(whereis your_file)
 
Old 05-05-2006, 04:58 AM   #3
Ander
Member
 
Registered: Apr 2003
Location: Vancouver
Distribution: Debian
Posts: 37

Original Poster
Rep: Reputation: 15
Wow, that is cool!

So you put those terms in parentheses () ... I've never them used in a command like that. How does it work?
 
Old 05-05-2006, 06:18 AM   #4
alexander_bosakov
Member
 
Registered: Mar 2006
Location: Plovdiv, Bulgaria
Distribution: OpenSuse 11.3
Posts: 55

Rep: Reputation: 15
The $(program) or its synonym `program` ( ` - backquote, not ') are expanded by the shell to the output of "program". For example:

whereis bash
bash: /bin/bash /usr/share/man/man1/bash.1.bz2

so "ls -l $(whereis bash)" is translated by the shell to

ls -l bash: /bin/bash /usr/share/man/man1/bash.1.bz2

You may have noticed the first row of the output:
ls: bash:: No such file or directory
 
  


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
using $PATH with whereis shanenin Programming 5 09-16-2005 10:28 AM
whereis firefox Monjawi Linux - Newbie 1 09-09-2005 06:19 PM
whereis Realplayer? mohapi Fedora 8 06-12-2004 03:00 PM
help : whereis mkinitrd? marsques Slackware 6 05-23-2004 04:52 PM
whereis cups tincat2 Linux - General 2 05-07-2003 12:28 PM


All times are GMT -5. The time now is 05:28 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration