bash: fdisk: command not found
Dears,,
I am trying to use fdisk command as following but it gave me error . . [root@rac2 ~]# fdisk bash: fdisk: command not found I am running on Oracle Enterprise Linux 32-bit Why this? |
Well the answer is obvious-- it's not in the path, try calling it by the full path name.
Code:
/sbin/fdisk |
It's in /sbin and /sbin is not in your $PATH
|
But the path already defined in .bash_profile as following . . .
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PS1="`/bin/hostname -s`-> " export EDITOR=vi export ORACLE_SID=devdb2 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin umask 022 export PATH unset USERNAME |
Quote:
|
Even i added /sbin in .bash_profile
it is the same error PATH=$PATH:$HOME/bin:/sbin export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin |
Did you log out and back in after changing .bash_profile?
Does using the full path (/sbin/fdisk) on the command line work ? |
Quote:
It is must after changing .bash_profile? Quote:
[root@rac2 ~]# /sbin/fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes ............. |
Quote:
you either log out then back in or run Code:
source .bash_profile |
Dears,,
Thanks for all of you . . . It is working fine now. I log out then back again and it worked fine. Thanks again |
The Thread Tools menu can be used to mark a thread SOLVED.
|
All times are GMT -5. The time now is 12:07 PM. |