LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-29-2012, 01:16 PM   #1
tushar_pandey
Member
 
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105

Rep: Reputation: Disabled
problem with , type ls


when i type this command this is not working in my system , it is showing me a error like , its not a error but .... when i use type cat its work easily!

Code:
type cat
cat is /bin/cat
type ls
ls is aliased to `ls --color=auto'
 
Old 08-29-2012, 01:22 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,300
Blog Entries: 61

Rep: Reputation: Disabled
Not much different to mine, must be normal:
Code:
bash-4.1$ type cat
cat is /usr/bin/cat
bash-4.1$ type ls
ls is /usr/bin/ls
bash-4.1$
It's a bash builtin, see man bash. Relevant bit here:
Quote:
type [-aftpP] name [name ...]
With no options, indicate how each name would be interpreted if used as a command name. If the -t option is used, type prints a string which is one of alias, keyword, function, builtin, or file if name is an alias, shell reserved word, function, builtin, or disk file, respectively. If the name is not found, then nothing is printed, and an exit status of false is returned. If the -p option is used, type either returns the name of the disk file that would be executed if name were specified as a command name, or nothing if ''type -t name'' would not return file. The -P option forces a PATH search for each name, even if ''type -t name'' would not return file. If a command is hashed, -p and -P print the hashed value, not necessarily the file that appears first in PATH. If the -a option is used, type prints all of the places that contain an executable named name. This includes aliases and functions, if and only if the -p option is not also used. The table of hashed commands is not consulted when using -a. The -f option suppresses shell function lookup, as with the command builtin. type returns true if all of the arguments are found, false if any are not found.

Last edited by brianL; 08-29-2012 at 01:28 PM.
 
Old 08-29-2012, 02:57 PM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333
do you mean
Code:
type ls
ls is aliased to `ls --color=auto'
is an error? No, it is normal, you have an alias defined for ls. You can check your aliases by typing the command alias.
try which ls
 
  


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
changing file system type to another filesystem type,does it effect on data? janakiramulu Ubuntu 1 02-04-2011 01:58 AM
mandriva dual boot filesystem type unknown,partition type 0x7 llearner Linux - Newbie 2 01-24-2010 02:03 PM
Dual Boot Vista Suse 10.2 error setting type of partition to type 82 jmp559 Linux - General 1 05-15-2008 06:40 PM
Warning ___ specifies undefined mime type/service type mbvpixies78 Linux - Software 0 12-29-2007 10:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:14 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