Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
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.
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.
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.
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.
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
maybe photorec can help recover some of the files ?
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.