You are not logged in.

#1 2009-03-02 13:20:20

stonecoldjha
Member
Registered: 2009-02-01
Posts: 44

how do i use the mirrors

i did rankmirrors -v.but,where should the contents be pasted so that the mirrors can be used?

Offline

#2 2009-03-02 13:28:21

MilosC
Member
From: Serbia
Registered: 2008-06-04
Posts: 79

Re: how do i use the mirrors

You have to specify file with list of mirrors, for example:

rankmirrors -v /etc/pacman.d/mirrorlist

Offline

#3 2009-03-02 13:33:43

stonecoldjha
Member
Registered: 2009-02-01
Posts: 44

Re: how do i use the mirrors

i know where it is....but what do i do with this text file containing list?

Offline

#4 2009-03-02 14:41:23

cdwillis
Member
From: /home/usa
Registered: 2008-11-20
Posts: 294

Re: how do i use the mirrors

Here's an example of using rankmirrors to generate the top 5 mirrors into your list

cd /etc/pacman.d
cp mirrorlist mirrorlist.backup
rm mirrorlist
rankmirrors -n 5 mirrorlist.backup > mirrorlist

Offline

#5 2009-03-02 18:29:57

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: how do i use the mirrors

I get:

bash: mirrorlist: Permission denied

even if I sudo the command.  Any ideas?

Offline

#6 2009-03-02 19:09:35

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: how do i use the mirrors

Are you trying to do this as your regular user or root? /etc/mirrorlist doesn't have write permissions unless you're root.

Offline

#7 2009-03-02 19:14:01

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: how do i use the mirrors

honestly I haven't been able to figure out how to open a root shell with lxterminal (lxde)

Offline

#8 2009-03-02 19:52:53

Hrod beraht
Member
Registered: 2008-09-30
Posts: 186

Re: how do i use the mirrors

ctarwater wrote:

honestly I haven't been able to figure out how to open a root shell with lxterminal (lxde)

su -

Offline

#9 2009-03-02 20:25:32

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: how do i use the mirrors

heh, wow.  I'll hang my head in shame now.

Thanks for the help, it worked fine.

I just have to say, this is a perfect example of how I've been ruined by GUI and other OSes...I'm so used to having a GUI option to click to open a root terminal that I never knew how to do it manually.  Not that there is anything wrong with a good gui, but the knowledge of how to do it manually should be there.  Again, a reason I love arch.

Offline

#10 2009-03-02 21:11:48

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: how do i use the mirrors

stonecoldjha, see cdwillis's post. rankmirrors outputs the new mirrorlist file to stdout. You need to redirect the output to a file.

ctarwater, if you prefer sudo to su, you can use `sudo -i', which is exactly like `su -' (in that it creates a root login shell) except it uses your user password (or none at all, depending upon the contents of /etc/sudoers). You got the permission error when you ran `sudo rankmirrors OLDFILE > /etc/pacman.d/mirrorlist' because sudo didn't get applied to the output redirection.

Offline

#11 2009-03-02 23:23:33

alex_anthony
Member
From: UK
Registered: 2007-09-25
Posts: 344

Re: how do i use the mirrors

or you could pipe (|) the output to sudo tee

does sudo -i keep a record of the commands like you get with running sudo before each command?

Offline

#12 2009-03-02 23:55:30

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: how do i use the mirrors

Afaik tee is used in shell scripts to record a program's output to a file while still printing it to stdout. Simple shell redirection is preferred whenever you don't need to print to stdout at the same time.

`sudo -i' creates a root login shell, so commands you enter there will be entered into your root shell's history, not your user's history.

Offline

Board footer

Powered by FluxBB