LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-17-2012, 03:05 PM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Some linux commands are not supported


Hi to all ;

Really some commands are not supported in my system.
I am using Host/Guest Opearting System. Please help me!


For ex :


PHP Code:
[root@localhost ~]# tree 
-bashtreecommand not found 

PHP Code:
[root@localhost ~]# tree -a
-bashtreecommand not found 

PHP Code:
[root@localhost ~]# cat   /etc/*-version
cat: /etc/*-version: No such file or directory 
I am not saying all commands some comamnds. I am from oracle DBA area. I am learning linux step by step. Few commands are not working
i could n't realize what's happening ?
 
Old 11-17-2012, 03:17 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hi,

could you please post the output of
Code:
echo $PATH
and
Code:
which tree
Markus
 
Old 11-17-2012, 03:50 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,001

Rep: Reputation: 67
The command tree is not defined on my system (Ubuntu 11.10) either. I'd be willing to bet that this command is installed along with some package that is an addition to linux rather than being a native linux command.

On a Debian or Ubuntu distro, you can search for Oracle packages.
Code:
apt-cache search oracle
If you have root access, you can install them:
Code:
apt-get install package-id
 
Old 11-17-2012, 09:24 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
On Slackware 13.37 /usr/bin/tree is installed as part of the distro by package tree-1.5.3.

Chances are that other distros have a tree package.
 
Old 11-17-2012, 11:30 PM   #5
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Jessie
Posts: 592

Rep: Reputation: 119Reputation: 119
On Debian (most likely on Debian-based distros also), the tree command is in the tree package.
Code:
apt-cache show tree
Package: tree
Priority: optional
Section: utils
Installed-Size: 92
Maintainer: Florian Ernst <florian@debian.org>
Architecture: i386
Version: 1.5.3-1
Depends: libc6 (>= 2.3)
Filename: pool/main/t/tree/tree_1.5.3-1_i386.deb
Size: 31178
MD5sum: d6dff6c05861ed07d02c5df172d8909a
SHA1: 42b5ec771fae097fba74c33134746c38b76ef837
SHA256: 7ae07f4628e20cd080176133e28b93b6fd55f6ea4d8433180719ded3a0686f93
Description: displays directory tree, in color
 Displays an indented directory tree, using the same color assignments as
 ls, via the LS_COLORS environment variable.
Homepage: http://mama.indstate.edu/users/ice/tree/
Tag: implemented-in::c, interface::commandline, role::program, scope::utility, use::browsing, works-with::file
To install it:
Code:
sudo apt-get install tree
 
Old 11-17-2012, 11:52 PM   #6
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
1) Command tree is no more supported in recent versions of the OS.
2) If you're getting No such file or directory message, then it means that the file or directory that you speified doesn't exist, but command i.e. cat is working file.
3) In order to check whether a command exists or not, simply use which command followed by command you want to check:
Code:
which <command_name>
For example:
which cat
/usr/bin/cat
4) You can use only those available commands on a system which are set in your PATH variable. To check, use:
Code:
echo $PATH
It will list all parent directories under which your executable commands lying and that you can use. To add more commands to your PATH, just do:
Code:
export PATH=$PATH:<path/to/dir>
For example:
export PATH=$PATH:/usr/local/bin

Last edited by shivaa; 11-17-2012 at 11:56 PM.
 
1 members found this post helpful.
Old 11-18-2012, 12:36 AM   #7
rajkumar.m
LQ Newbie
 
Registered: May 2010
Posts: 18

Rep: Reputation: 12
Make sure which operating system you are using by below command?

cat /etc/redhat-release

cat /etc/issue


If it is Ubuntu or Debian use below command

#dpkg -l | grep -i tree

Use above command to check `tree` command is installed or not. It it is not installed. Use apt-get command to install it. By default tree command wont come with ubuntu

apt-get install tree

If it is Redhat / Centos or fedora use below command

Check the below package is installed
#rpm -qf /usr/bin/tree
tree-1.5.0-4

If it is installed you can trace the command location using below command
which tree
/usr/bin/tree



Thanks
Rajkumar.M
For Linux related Technical Study check out the below link
www.thetechnicalstuff.com
 
Old 11-18-2012, 12:56 AM   #8
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
@ hi to all;

Tree is basic linux comamnd . I searched google to download tree package.
It shows many things.

PHP Code:

[root@localhost ~]# uname -avr
Linux localhost.localdomain 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 athlon i386 GNU/Linux

[root@localhost ~]# cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 4)

[
root@localhost ~]# cat /etc/issue
Enterprise Linux Enterprise Linux AS release 4 (October Update 4)
Kernel \r on an \m

[root@localhost ~]# cat   /etc/*-version
cat: /etc/*-version: No such file or directory

>> Here , Tree Package is installed >>

[root@localhost ~]# rpm -qa |grep tree
python-elementtree-1.2.6-4 

Additional question :-

I think tree common and basic command.
Some useful applications and utilities are added over the kernel,
then the complete package becomes an OS. So i think all basic commands
is common to all linux distros.

As per previous reply , confusing me ,
Quote:
Make sure which operating system you are using by below command?
1. Won't linux various distros support basic commands ?
i mean common commands ...

2. Tree is package is installed , but command not working
what's the reason ?

Last edited by thiyagusham; 11-18-2012 at 01:14 AM.
 
Old 11-18-2012, 01:25 AM   #9
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
@ hi to all;

Everyone saying different methods. I am getting confused as well as no output.

>> This one says package is installed >>

PHP Code:
[root@localhost ~]# rpm -qa |grep tree
python-elementtree-1.2.6-
>> This one says package is not installed >>

PHP Code:
root@localhost ~]# rpm -qf /usr/bin/tree
errorfile /usr/bin/treeNo such file or directory 
>> My os detail >>

PHP Code:
[root@localhost ~]# uname -avr
Linux localhost.localdomain 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 athlon i386 GNU/Linux 
Please don't confuse me , i need solution ...

Regards
Thiyagusham .G
 
Old 11-18-2012, 01:29 AM   #10
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hi markush and all linuxions;

Quote:
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
Quote:
[root@localhost ~]# which tree
/usr/bin/which: no tree in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)

Last edited by thiyagusham; 11-18-2012 at 02:55 AM. Reason: Duplicted
 
Old 11-18-2012, 01:31 AM   #11
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hi markush and all linuxions;

PHP Code:
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin 
PHP Code:
[root@localhost ~]# which tree
/usr/bin/whichno tree in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
 
Old 11-18-2012, 03:03 AM   #12
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
There's no point of getting confused. If you just need tree command, then it usually found under /usr/bin directory. But it's not installed by default and in your case, it's not installed on your system.
So you can downlload it from http://mama.indstate.edu/users/ice/tree/. Then unzip this file and simply run installer.
Then you can check it using which tree command.
 
Old 11-18-2012, 03:28 AM   #13
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hi to all ;

Shiva ... i am getting error ..

PHP Code:
[root@localhost TREE]# ls -al
total 24
drwxrwxrwx  1 root root     0 Nov 18 13
:42 .
dr-xr-xr-x  1 root root  4192 Nov 18 13:52 ..
-
rwxrwxrwx  1 root root 42706 Nov 18 13:41 tree-1.6.0.tgz
[root@localhost TREE]# rpm –ivh tree-1.6.0.tgz
RPM version 4.3.3
Copyright 
(C1998-2002 Red HatInc.
This program may be freely redistributed under the terms of the GNU GPL 
PHP Code:
Usagerpm [-aKfgpqV] [-aKfgpqVcdils] [-aKfgpqVcdilsaKfgpqV] [-aKfgpqVcdilsaKfgpqV] [-aKfgpqVcdilsaKfgpqVK] [-aKfgpqVcdilsaKfgpqVK] [-aKfgpqVcdilsaKfgpqVKi] [-aKfgpqVcdilsaKfgpqVKiv] [-aKfgpqVcdilsaKfgpqVKiv] [-aKfgpqVcdilsaKfgpqVKiv?] [-a|--all] [-f|--file] [-g|--group]
        [-
p|--package] [--specfile] [--whatrequires] [--whatprovides]
        [-
c|--configfiles] [-d|--docfiles] [--dump] [-l|--list]
        [--
queryformat=QUERYFORMAT] [-s|--state] [--nomd5] [--nofiles]
        [--
nodeps] [--noscript] [--addsign] [-K|--checksig] [--import]
        [--
resign] [--nodigest] [--nosignature] [--initdb] [--rebuilddb]
        [--
aid] [--allfiles] [--allmatches] [--badreloc]
        [-
e|--erase <package>+] [--excludedocs] [--excludepath=<path>]
        [--
fileconflicts] [--force] [-F|--freshen <packagefile>+] [-h|--hash]
        [--
ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb]
        [--
nodeps] [--nomd5] [--nocontexts] [--noorder] [--nosuggest]
        [--
noscripts] [--notriggers] [--oldpackage] [--percent]
        [--
prefix=<dir>] [--relocate=<old>=<new>] [--repackage]
        [--
replacefiles] [--replacepkgs] [--test]
        [-
U|--upgrade <packagefile>+] [-D|--define 'MACRO EXPR']
        [-
E|--eval 'EXPR'] [--macros=<FILE:...>] [--nodigest] [--nosignature]
        [--
rcfile=<FILE:...>] [-r|--root ROOT] [--querytags] [--showrc]
        [--
quiet] [-v|--verbose] [--version] [-?|--help] [--usage]
        [--
scripts] [--setperms] [--setugids] [--conflicts] [--obsoletes]
        [--
provides] [--requires] [--info] [--changelog] [--triggers]
        [--
last] [--filesbypkg] [--fileclass] [--filecolor] [--filecontext]
        [--
fscontext] [--recontext] [--fileprovide] [--filerequire]
        [--
redhatprovides] [--redhatrequires] [--buildpolicy=<policy>]
        [--
with=<option>] [--without=<option>]

[
root@localhost TREE]# echo $?

>> When trying unzip >>

[
PHP Code:
root@localhost TREE]# unzip tree-1.6.0.tgz
Archive:  tree-1.6.0.tgz
  End
-of-central-directory signature not found.  Either this file is not
  a zipfile
, or it constitutes one disk of a multi-part archive.  In the
  latter 
case the central directory and zipfile comment will be found on
  the last disk
(sof this archive.
note:  tree-1.6.0.tgz may be a plain executablenot an archive
unzip
:  cannot find zipfile directory in one of tree-1.6.0.tgz or
        
tree-1.6.0.tgz.zip, and cannot find tree-1.6.0.tgz.ZIPperiod

Last edited by thiyagusham; 11-18-2012 at 03:32 AM.
 
Old 11-18-2012, 03:38 AM   #14
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
-Tree is not a basic Linux command, it have never been, it probably never will

-There is utilities that come with the Linux kernel, but they are usually tools to either debug it or set some variables. Basic command are part of GNU, not Linux. It is a basic MS DOS command. The Linux equivalent would be "ls -R"

-"cat /etc/*-releases" is not a command, "cat" is a command, /etc is a directory and *-release a shell expression for all files ended with "release". Not all distributions provide such files, it is not required by Linux.

Your Linux is also very old, it is time to upgrade. Old version of Oracle might still work, but keeping outdated system is not a food idea at all. If you never did the updates because you don't pay for them, use a free distributions.

To install something, don't search Google. Use "yum install <package-name>", it work on modern RedHat based distributions since about 2007. But yours look older.
 
1 members found this post helpful.
Old 11-18-2012, 04:15 AM   #15
mandyapenguin
Member
 
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 106

Rep: Reputation: Disabled
On RedHat based O/S
Code:
yum install tree
On Debian based O/S
Code:
apt-get install tree
Code:
tree
If you find any error like command not found or something, search daemon path using
Code:
whereis tree
or
which tree
Then set the path to environment variable.
Code:
export PATH=/path/of/file's_dir:$PATH
Now run
Code:
tree

Last edited by mandyapenguin; 11-18-2012 at 04:17 AM.
 
  


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 07:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 07:53 AM


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