LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-07-2015, 01:36 PM   #61
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled

delete the question

Last edited by seabag; 06-08-2015 at 09:29 AM. Reason: to delete
 
Old 06-07-2015, 02:51 PM   #62
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,948
Blog Entries: 11

Rep: Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816
Quote:
Originally Posted by seabag View Post
fatmac: it shows a space between the '\' and Expansion & Drive. Did you intend to show that space?
As fatmac seems to be in another time frame, I'll try to answer that...

What fatmac is showing is two different ways of preventing the shell interpreter from handling the spaces, called "escaping" them.

The first...

Code:
ls /media/Seagate?Expansion?Drive
...works because in the shell a "?" character replaces any single character, in this case the spaces at those locations.

The second...

Code:
ls /media/Seagate\ Expansion\ Drive
...works because in the shell a "\" character means to handle the character that follows as a simple character without any special meaning that would normally apply - again the spaces.

A good place to learn more about special characters and how to escape them may be found here.

Last edited by astrogeek; 06-07-2015 at 02:53 PM. Reason: tpos, typs, typos
 
1 members found this post helpful.
Old 06-07-2015, 07:07 PM   #63
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,249

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Quote:
Originally Posted by seabag View Post
When I ran that one a few times and this was the result:

Code:
joseph@joseph-TravelMate-2300:~$ sudo dd if=/dev/sda1 of=/media/Seagate Expansion Drive
[sudo] password for joseph: 
dd: unrecognized operand `Expansion'
Try `dd --help' for more information.
Quote:
Originally Posted by seabag View Post
The return is:
Code:
joseph@joseph-TravelMate-2300:~$ ll /media/Seagate Expansion Drive
ls: cannot access /media/Seagate: No such file or directory
ls: cannot access Expansion: No such file or directory
ls: cannot access Drive: No such file or directory
are you allergic to double-quotes (") for some reason ?


Quote:
Originally Posted by fatmac View Post
I haven't read all of the above posts, but with a filename that has spaces in it either substitute a ? or use a \ before it in the name.

Say you have /media/Seagate Expansion Drive
you would use either
Code:
ls /media/Seagate?Expansion?Drive
or
Code:
ls /media/Seagate\ Expansion\ Drive
hope that helps.
i find slapping quotes around the whole string easier.

Last edited by schneidz; 06-07-2015 at 07:17 PM.
 
Old 06-08-2015, 09:51 AM   #64
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thanks astrogeek for the explanation and the reference (tho' most of the boolean language in the reference is above me for now.)

Sorry there, schneidz. I did not realize at the time the significance of the double quotes around the command. I am finding myself to be a bit allergic to the red flowers of the wild Andean mountain grass.
 
Old 06-08-2015, 10:03 AM   #65
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
I am using gpart to search for file systems on the external drive, /dev/sdb. I am doing this in order to map out a logical next step to recover the external drive even though its only music and movies and family photos.
 
Old 06-08-2015, 03:29 PM   #66
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,680

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Quote:
Originally Posted by seabag View Post
I am using gpart to search for file systems on the external drive, /dev/sdb. I am doing this in order to map out a logical next step to recover the external drive even though its only music and movies and family photos.
No, it's gone.
Either restore your backup, pay a data recovery service some large dollars to get some of it, or just call it a lesson and move on.
 
Old 06-08-2015, 04:01 PM   #67
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,249

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
maybe photorec can help recover some of the files ?
 
Old 06-08-2015, 06:40 PM   #68
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thanks for the tip on photorec, schneidz. I think I will chalk it up as a lesson and move on.

Do you think I can reformat the external drive from gparted? I noticed that previously some one criticized the format (ntfs) of the external drive. That may be the reason that the transfer of sda1 (ext4) threw such a screw into the external drive.

Would it be better for the linux system if I format the drive as ext 4? Seems like that would be logical.

Quote:
Originally Posted by schneidz View Post
maybe photorec can help recover some of the files ?
 
Old 06-08-2015, 08:27 PM   #69
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
What I want to do is reformat sdb, the external drive, and re-assign it's mount point to /media/seagate2TB. żIs gparted the proper tool, or terminal better? How do I start? I am a little freaked by the /proc and the /etc/fstab files as well as others that seem to get involved in this process.

Here is some current information. n.b. /dev/sdb1 is identical to /dev/sda1 as described by <df -h>.

Code:
joseph@joseph-TravelMate-2300:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        54G   26G   25G  51% /
udev            992M  4.0K  992M   1% /dev
tmpfs           200M  812K  199M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            999M  104K  999M   1% /run/shm
/dev/sdb1        54G   26G   25G  51% /
/dev/sdc1       299G  223G   76G  75% /media/FreeAgentDrive

joseph@joseph-TravelMate-2300:~$ sudo lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  55.9G  0 disk 
├─sda1   8:1    0  53.9G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0     2G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  
sdb      8:16   0   1.8T  0 disk 
└─sdb1   8:17   0   1.8T  0 part 
sdc      8:32   0 298.1G  0 disk 
└─sdc1   8:33   0 298.1G  0 part /media/FreeAgentDrive
Here, /dev/sdb1 is shown as 1.8T. /dev/sdc is something I am using just to get markers. It is another USB external drive. It is working normally.
 
Old 06-09-2015, 01:29 AM   #70
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,680

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Yes sdb1 is identical to sda1 because you made it that way with dd.
Presumably your DE has now helpfully mounted it over your existing root volume when you plugged it in, because it has the same UUID that appears in your fstab for /

My advice is to stop and back slowly away from the PC before you destroy whatever remains of your personal data.

You need to do some research on the basics of navigating a linux filesystem then do a LOT more on the basic concepts of partitions and filesystems.

THEN do some basic research on the tools you plan on using and read a few howto's and come back and ask some questions if you are still not sure, and make sure you read and understand what people are telling you.

dd is much like a chainsaw, in that it is a powerful and effective tool when used correctly.
For the love of Bob, read the instructions first and make sure you pick it up by the right end...
 
1 members found this post helpful.
Old 06-09-2015, 07:58 AM   #71
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,249

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Quote:
Originally Posted by seabag View Post
Thanks for the tip on photorec, schneidz. I think I will chalk it up as a lesson and move on.

Do you think I can reformat the external drive from gparted? I noticed that previously some one criticized the format (ntfs) of the external drive. That may be the reason that the transfer of sda1 (ext4) threw such a screw into the external drive.

Would it be better for the linux system if I format the drive as ext 4? Seems like that would be logical.
linux is able to read write onto many windows/mac/sun-os/unix/... file-systems but i personally think it is more efficient (as far as permissions are concerned) to stick with a linux file-system. the reason why you screwed up your external drive is because you were given certain directions but you chose to run different commands.

i use gparted to create and resize partitions. i would start by making sure the external drive is unmounted then delete all the existing partitions. then create your new partitions in the format you like.
 
  


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
LXer: How to perform system backup with backup-manager on Linux LXer Syndicated Linux News 0 11-14-2014 08:40 AM
Tar fails on system backup - need to backup remote web server cilbuper Linux - General 2 08-26-2014 12:28 AM
how to take system backup like system restore in windows piyush.ml20 Linux - Newbie 3 09-26-2008 03:57 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:49 PM.

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