Get data from debian via external hard drive, command line and root user [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Re-post from Stack Overflow

My PC on Debian (Jessie) doesn't work well any more and I only have the command line interface (and only can connect with root). I would like to copy my data on my external hard drive (I know I should have done backups before but I made a slip up when doing it) but I don't manage to do it.

First, my PC seems not to detect it (or a usb key - NTFS), then I did these commands for now:



# cd /
# find . -name "exthd"
./dev/disk/by-label/exthd
./media/username/exthd
# cp -R dataFile /media/username/exthd
# chown -R username /media/username/exthd


But when I do an ls -l on /media/username/exthd there is only the files I copied while there are 3 other files, and when my exthd isn't connected I still find it in /media/username with the data I copied in (that's why I think actually my exthd isn't detected). And when I connect exthd on my other PC (on win10) there aren't my copied data (that's why I tested to make a chown).

NB: I already used exthd on this PC.



[Results of commands]

To resume.
fdisk -l:

- /dev/sda1 => EFI System

- /dev/sda2 => Linux filesystem

- /dev/sda3 => Linux swap

- /dev/sdb1 => HPFS/NTFS/exFAT.

I'm using a usb key right now because I don't have exthd near me, I found its name only in ./dev/disk/by-label/myusbname (find command), and it seems to be sdb1, same capacity in fdisk -l and same name in blkid.










share|improve this question















closed as off-topic by Jeff Schaller, Anthon, Stephen Rauch, GAD3R, Satō Katsura Oct 1 '17 at 18:10


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 1




    There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
    – mrc02_kr
    Sep 26 '17 at 8:45










  • Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
    – olivierb2
    Sep 27 '17 at 19:46










  • It works! Thank you so so much!
    – kndmsj
    Sep 27 '17 at 20:00














up vote
1
down vote

favorite












Re-post from Stack Overflow

My PC on Debian (Jessie) doesn't work well any more and I only have the command line interface (and only can connect with root). I would like to copy my data on my external hard drive (I know I should have done backups before but I made a slip up when doing it) but I don't manage to do it.

First, my PC seems not to detect it (or a usb key - NTFS), then I did these commands for now:



# cd /
# find . -name "exthd"
./dev/disk/by-label/exthd
./media/username/exthd
# cp -R dataFile /media/username/exthd
# chown -R username /media/username/exthd


But when I do an ls -l on /media/username/exthd there is only the files I copied while there are 3 other files, and when my exthd isn't connected I still find it in /media/username with the data I copied in (that's why I think actually my exthd isn't detected). And when I connect exthd on my other PC (on win10) there aren't my copied data (that's why I tested to make a chown).

NB: I already used exthd on this PC.



[Results of commands]

To resume.
fdisk -l:

- /dev/sda1 => EFI System

- /dev/sda2 => Linux filesystem

- /dev/sda3 => Linux swap

- /dev/sdb1 => HPFS/NTFS/exFAT.

I'm using a usb key right now because I don't have exthd near me, I found its name only in ./dev/disk/by-label/myusbname (find command), and it seems to be sdb1, same capacity in fdisk -l and same name in blkid.










share|improve this question















closed as off-topic by Jeff Schaller, Anthon, Stephen Rauch, GAD3R, Satō Katsura Oct 1 '17 at 18:10


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 1




    There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
    – mrc02_kr
    Sep 26 '17 at 8:45










  • Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
    – olivierb2
    Sep 27 '17 at 19:46










  • It works! Thank you so so much!
    – kndmsj
    Sep 27 '17 at 20:00












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Re-post from Stack Overflow

My PC on Debian (Jessie) doesn't work well any more and I only have the command line interface (and only can connect with root). I would like to copy my data on my external hard drive (I know I should have done backups before but I made a slip up when doing it) but I don't manage to do it.

First, my PC seems not to detect it (or a usb key - NTFS), then I did these commands for now:



# cd /
# find . -name "exthd"
./dev/disk/by-label/exthd
./media/username/exthd
# cp -R dataFile /media/username/exthd
# chown -R username /media/username/exthd


But when I do an ls -l on /media/username/exthd there is only the files I copied while there are 3 other files, and when my exthd isn't connected I still find it in /media/username with the data I copied in (that's why I think actually my exthd isn't detected). And when I connect exthd on my other PC (on win10) there aren't my copied data (that's why I tested to make a chown).

NB: I already used exthd on this PC.



[Results of commands]

To resume.
fdisk -l:

- /dev/sda1 => EFI System

- /dev/sda2 => Linux filesystem

- /dev/sda3 => Linux swap

- /dev/sdb1 => HPFS/NTFS/exFAT.

I'm using a usb key right now because I don't have exthd near me, I found its name only in ./dev/disk/by-label/myusbname (find command), and it seems to be sdb1, same capacity in fdisk -l and same name in blkid.










share|improve this question















Re-post from Stack Overflow

My PC on Debian (Jessie) doesn't work well any more and I only have the command line interface (and only can connect with root). I would like to copy my data on my external hard drive (I know I should have done backups before but I made a slip up when doing it) but I don't manage to do it.

First, my PC seems not to detect it (or a usb key - NTFS), then I did these commands for now:



# cd /
# find . -name "exthd"
./dev/disk/by-label/exthd
./media/username/exthd
# cp -R dataFile /media/username/exthd
# chown -R username /media/username/exthd


But when I do an ls -l on /media/username/exthd there is only the files I copied while there are 3 other files, and when my exthd isn't connected I still find it in /media/username with the data I copied in (that's why I think actually my exthd isn't detected). And when I connect exthd on my other PC (on win10) there aren't my copied data (that's why I tested to make a chown).

NB: I already used exthd on this PC.



[Results of commands]

To resume.
fdisk -l:

- /dev/sda1 => EFI System

- /dev/sda2 => Linux filesystem

- /dev/sda3 => Linux swap

- /dev/sdb1 => HPFS/NTFS/exFAT.

I'm using a usb key right now because I don't have exthd near me, I found its name only in ./dev/disk/by-label/myusbname (find command), and it seems to be sdb1, same capacity in fdisk -l and same name in blkid.







debian data-recovery






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 28 '17 at 8:26

























asked Sep 26 '17 at 8:39









kndmsj

63




63




closed as off-topic by Jeff Schaller, Anthon, Stephen Rauch, GAD3R, Satō Katsura Oct 1 '17 at 18:10


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Jeff Schaller, Anthon, Stephen Rauch, GAD3R, Satō Katsura Oct 1 '17 at 18:10


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 1




    There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
    – mrc02_kr
    Sep 26 '17 at 8:45










  • Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
    – olivierb2
    Sep 27 '17 at 19:46










  • It works! Thank you so so much!
    – kndmsj
    Sep 27 '17 at 20:00












  • 1




    There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
    – mrc02_kr
    Sep 26 '17 at 8:45










  • Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
    – olivierb2
    Sep 27 '17 at 19:46










  • It works! Thank you so so much!
    – kndmsj
    Sep 27 '17 at 20:00







1




1




There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
– mrc02_kr
Sep 26 '17 at 8:45




There is difference between detected and mounted. Please show us output of following commands: fdisk -l and blkid
– mrc02_kr
Sep 26 '17 at 8:45












Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
– olivierb2
Sep 27 '17 at 19:46




Can you just mount your drive with mount /dev/sdb1 /media/username/exthd/ then content of the external drive will be displayed, but previous folder content will be hidden until to umount to drive.
– olivierb2
Sep 27 '17 at 19:46












It works! Thank you so so much!
– kndmsj
Sep 27 '17 at 20:00




It works! Thank you so so much!
– kndmsj
Sep 27 '17 at 20:00










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










I made following commands (without the results):



# cd /
# fdisk -l
# blkid
# mount /dev/sdb1 /media/username/exthd
# cp -R /home/username/Documents /media/username/exthd
# umount /media/username/exthd


/dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands.
/media/username/exthd: where I want to mount my disk.
/home/username/Documents: the folder of data I want to copy.



It worked, I recovered my data.






share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    I made following commands (without the results):



    # cd /
    # fdisk -l
    # blkid
    # mount /dev/sdb1 /media/username/exthd
    # cp -R /home/username/Documents /media/username/exthd
    # umount /media/username/exthd


    /dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands.
    /media/username/exthd: where I want to mount my disk.
    /home/username/Documents: the folder of data I want to copy.



    It worked, I recovered my data.






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      I made following commands (without the results):



      # cd /
      # fdisk -l
      # blkid
      # mount /dev/sdb1 /media/username/exthd
      # cp -R /home/username/Documents /media/username/exthd
      # umount /media/username/exthd


      /dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands.
      /media/username/exthd: where I want to mount my disk.
      /home/username/Documents: the folder of data I want to copy.



      It worked, I recovered my data.






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        I made following commands (without the results):



        # cd /
        # fdisk -l
        # blkid
        # mount /dev/sdb1 /media/username/exthd
        # cp -R /home/username/Documents /media/username/exthd
        # umount /media/username/exthd


        /dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands.
        /media/username/exthd: where I want to mount my disk.
        /home/username/Documents: the folder of data I want to copy.



        It worked, I recovered my data.






        share|improve this answer












        I made following commands (without the results):



        # cd /
        # fdisk -l
        # blkid
        # mount /dev/sdb1 /media/username/exthd
        # cp -R /home/username/Documents /media/username/exthd
        # umount /media/username/exthd


        /dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands.
        /media/username/exthd: where I want to mount my disk.
        /home/username/Documents: the folder of data I want to copy.



        It worked, I recovered my data.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 28 '17 at 8:35









        kndmsj

        63




        63












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?