Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Please Help? Accessing hard disk partition in Linux

    This is the output i get when i issue df -h command on Redhat linux.

    [abcd@node2 ~]$ sudo df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 3.0G 1.3G 1.5G 47% /
    none 441M 0 441M 0% /dev/shm
    989G 142G 768G 16% /proj/WormTraffic
    597G 97G 453G 18% /users/xyz
    597G 97G 453G 18% /users/abcd
    20G 9.6G 8.5G 54% /share
    [abcd@node2 ~]$ pwd

    I want to access the /dev/sda2 partition, as seen from above right now i am on /users/abcd

    I can get root access using the sudo command.

    Can anyone just tell me how to store any file on /dev/sda2 and later how to access it. Are we required to use some special commands for this.

  2. #2
    IF i try to copy a file, i get the following error

    [abcd@node2 ~]$ cp Startattacks1 /dev/sda2/Startattacks
    cp: accessing `/dev/sda2/Startattacks': Not a directory

  3. #3
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    /dev/sda2 is the name of the device, when you use commands such as cp to copy, you have to use the mount point of the device to actually do the copying. In your case, you would want to try:
    cp Starattacks /
    what this means is, copy some file called starattacks to the root directory.

    This is from looking at output from df -h, it says /dev/sda2 is mounted as / i.e. the root partition.

    I suggest you read through this tutorial to get a better understanding.
    Life is complex, it has a real part and an imaginary part.

  4. $spacer_open
  5. #4
    Hey Alexk,

    Thanks for the help, the tutorial was very useful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts