zoukankan      html  css  js  c++  java
  • RedHat Linux 5下不能使用fdisk的问题

    最近在用RedHat Linux5的时候,使用fdisk命令,遇到了下面的错误:

    bash:fdisk:command not found

    在网上找了找,解决方案如下:

    首先,这个错误的原因是因为fdisk不在PATH的路径中

    查看PATH路径:

    [TrishBoay@localhost ~]$echo $PATH

    /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/baixiaohu/bin

    找到fdisk路径:

    [TrishBoay@localhost ~]$whereis fdisk

    fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz

    讲fdisk路径加入到PATH路径中,使用ln指令:

    [TrishBoay@localhost ~]$su

    passwd:

    [root@localhost ~]#ln -s /sbin/fdisk  /usr/bin

    查看/usr/bin目录:

    [root@localhost ~]#find /usr/bin|grep "fdisk"

    /usr/bin/fdisk

    下面就可以使用fdisk指令了

    [root@localhost ~]#fdisk -l

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          25      200781   83  Linux
    /dev/sda2              26        2065    16386300   82  Linux swap / Solaris
    /dev/sda3            2066       65806   511999582+  83  Linux
    /dev/sda4           65807      121601   448173337+   5  Extended
    /dev/sda5           65807       84928   153597433+  83  Linux
    /dev/sda6           84929       97676   102398278+  83  Linux
    /dev/sda7           97677      102775    40957686   83  Linux
    /dev/sda8          102776      105325    20482843+  83  Linux
    /dev/sda9          105326      109150    30720000   83  Linux

  • 相关阅读:
    5 浏览器跨域问题
    4 html文件引用问题
    3 Oracle 32位客户端安装及arcgis连接
    2 虚拟机Oracle11.2.0.4服务器端,第三方图形化界面安装步骤
    1 主机WiFi连接下与虚拟机通信问题
    数列分块入门 3 题解
    数列分块入门 2 题解
    SDOI2009 HH的项链 题解
    数列分块入门 1 题解
    [SHOI2002]空中都市 题解
  • 原文地址:https://www.cnblogs.com/CandiceW/p/6106739.html
Copyright © 2011-2022 走看看