Removing files using only the command line (GUI crashed)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Removing files using only the command line (GUI crashed)

Post by gdarroch »

Hi all,

I've got this problem: I can't access the gui, and only have the command line:

http://forums.linuxmint.com/viewtopic.php?f=90&t=145928

I'd like to remove the files I've put on the desktop to an external drive, so I can do a fresh install (I'm undecided between LM15 again and Win7). How do I do this using the command line?
Last edited by gdarroch on Thu Sep 26, 2013 6:19 pm, edited 1 time in total.
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing files using only the command line

Post by WharfRat »

gdarroch,

Any particular folder or your entire home :?:

Do you know how to mount the external or does it mount when you plug it in :?:
ImageImage
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line

Post by gdarroch »

Hi WharfRat, I haven't tried a mount yet. I'll let you know how that goes. At this stage I'm better to get the entire home drive, I think.
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line

Post by gdarroch »

I plugged in the USB but I'm not sure if it's mounting. What do I do to access the file menu?
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing files using only the command line

Post by WharfRat »

gdarroch wrote:I plugged in the USB but I'm not sure if it's mounting. What do I do to access the file menu?
Check under /media/yourname. When I plug in a flash drive that's where it mounts. You can use:

Code: Select all

mount|grep media
If it's not mounted check if fdisk sees it:

Code: Select all

sudo fdisk -lu
It should be sdb or sdc depending on the number of internal drives. Look for a partition e.g., /dev/sdb1. You can try mounting it manually with:

Code: Select all

sudo mkdir /media/external

Code: Select all

sudo chown yourname:yourname  /media/external

Code: Select all

sudo mount /dev/sdb1 /media/external
To copy your home:

Code: Select all

cd /media/external

Code: Select all

cp -a /home/yourname .
Good luck :wink:
ImageImage
User avatar
linuxviolin
Level 8
Level 8
Posts: 2083
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: Removing files using only the command line

Post by linuxviolin »

WharfRat wrote:
gdarroch wrote:I plugged in the USB but I'm not sure if it's mounting. What do I do to access the file menu?
Check under /media/yourname. When I plug in a flash drive that's where it mounts. You can use:

Code: Select all

mount|grep media
If it's not mounted check if fdisk sees it:

Code: Select all

sudo fdisk -lu
It should be sdb or sdc depending on the number of internal drives. Look for a partition e.g., /dev/sdb1. You can try mounting it manually with:

Code: Select all

sudo mkdir /media/external

Code: Select all

sudo chown yourname:yourname  /media/external

Code: Select all

sudo mount /dev/sdb1 /media/external
To copy your home:

Code: Select all

cd /media/external

Code: Select all

cp -a /home/yourname .
Good luck :wink:
Well, maybe also you could say him/her to unmount his/her drive at the end and how make this... Because if not, he/she can have a problem... :roll:
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

Thanks everyone. Yes I'd like to unmount the drive afterwards and so I haven't tried the solution posted yet because I don't want to risk losing everything - about the worst possible outcome.
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

Okay, I'm going to attach a drive, mount it, and leave it mounted until I work out how to do that. I just want to check that's okay.
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

What's the unmount code?
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing files using only the command line (GUI crashed)

Post by WharfRat »

gdarroch wrote:What's the unmount code?

Code: Select all

cd ~

Code: Select all

sudo umount /media/external
ImageImage
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

LM has remapped my keyboard and I can't find the | symbol. Anyone know how to access it?
Habitual
Level 13
Level 13
Posts: 4861
Joined: Sun Nov 21, 2010 8:31 pm
Location: 0.0.0.0

Re: Removing files using only the command line (GUI crashed)

Post by Habitual »

gdarroch wrote:LM has remapped my keyboard and I can't find the | symbol. Anyone know how to access it?
Next to the 1 key using Shift,
or....(don't you just love Linux?)...

Code: Select all

cd $home
...

sorry, that's for the ~ symbol.
Pipe symbol is Shift+back slash key "\"
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

No, it isn't. That's where it should be. I have no idea how to find it. Is there some kind of way of producing this?

##Beginning to wonder if I should just give up, find a linux professional to remove my files (if indeed they're still there) and say goodbye to this os.

##Linux Mint feels like an epic fantasy quest, where each achievement sends me off on another mission.

##I'm not technically illiterate. I use R for statistical programming. But I don't know enough about this to make it useful to me. And that's as it should be - you don't need to know how a car works to use one, nor do you generally want to. Time spent reading the manual is time not useful in my life for the things useful to me.
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

Can someone help me find the pipe key, so I can get my files off my pc, so I can apply for an important position which closes Wednesday?
nisha
Level 1
Level 1
Posts: 26
Joined: Wed Jun 16, 2010 10:20 am
Location: India

Re: Removing files using only the command line (GUI crashed)

Post by nisha »

I wud suggest to make a live usb of your choice of linux, boot from it and access the linux partition and copy your data if you can do that

Nisha
Anyone can build a fast processor. The trick is to build a fast system.
gdarroch
Level 1
Level 1
Posts: 25
Joined: Thu Sep 19, 2013 10:39 pm

Re: Removing files using only the command line (GUI crashed)

Post by gdarroch »

How do I do that? I'm not stupid, but I need a lot of hand-holding.
nisha
Level 1
Level 1
Posts: 26
Joined: Wed Jun 16, 2010 10:20 am
Location: India

Re: Removing files using only the command line (GUI crashed)

Post by nisha »

gdarroch wrote:How do I do that? I'm not stupid, but I need a lot of hand-holding.
Download linux iso and use the unetbootin or universal usb installer to create bootable usb linux. Boot from the usb and u will have access to all your partition linux and or windows to copy back your data.

Here is a link which might help you understand how to create bootable usb or cd.

[url]http://forums.linuxmint.com/viewtopic.php?f=46&t=52265[/url]

Link for Universal USB Installer works only on widows environment to create bootable linux usb

Code: Select all

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
Link for unetbooting, have version for windows, mac as well linux environment to create bootable linux usb

Code: Select all

http://unetbootin.sourceforge.net/
Anyone can build a fast processor. The trick is to build a fast system.
User avatar
linuxviolin
Level 8
Level 8
Posts: 2083
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: Removing files using only the command line (GUI crashed)

Post by linuxviolin »

gdarroch wrote:LM has remapped my keyboard and I can't find the | symbol. Anyone know how to access it?
In my case, with my French Azerty keyboard it's: AltGr + 6 (above the letters, not the numeric keypad) ===> | | |
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
Post Reply

Return to “Newbie Questions”