Difference between revisions of "Reflector"

From ArchWiki
Jump to: navigation, search
(Revert. pacman -S instruction is only used in Beginner's Guide. See Help:Style#Package management instructions.)
m (additional warning, added reflector command)
Line 8: Line 8:
  
 
[[pacman|Install]] the {{pkg|reflector}} package which is available in the [[Official Repositories|official repositories]].
 
[[pacman|Install]] the {{pkg|reflector}} package which is available in the [[Official Repositories|official repositories]].
 +
 +
{{Warning|Please back up your {{ic|/etc/pacman.d/mirrorlist}} file first}}
  
 
== Usage ==
 
== Usage ==
  
First it is recommended to back up your {{ic|/etc/pacman.d/mirrorlist}}:
+
First back up your {{ic|/etc/pacman.d/mirrorlist}}
 
+
  # cp -vf /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
  # cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
+
  
 
The following command will filter the first five mirrors, sort them by speed and overwrite the file {{ic|/etc/pacman.d/mirrorlist}}:
 
The following command will filter the first five mirrors, sort them by speed and overwrite the file {{ic|/etc/pacman.d/mirrorlist}}:
 +
# reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist
  
  # reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist
+
The following command will verbosely rate the 200 most recently synchronized HTTP servers, sort them by download rate, and overwrite the file {{ic|/etc/pacman.d/mirrorlist}}:
 +
  # reflector --verbose -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist
  
 
To see all of the available commands, run the following command:
 
To see all of the available commands, run the following command:
 
+
  # reflector --help
  $ reflector --help
+
  
 
{{Warning|Make sure the mirror list does not contain strange entries before syncing or updating with pacman.}}
 
{{Warning|Make sure the mirror list does not contain strange entries before syncing or updating with pacman.}}

Revision as of 18:20, 28 October 2012

Reflector is a script which can retrieve the latest mirror list from the MirrorStatus page, filter the most up-to-date mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist.

Installation

Install the reflector package which is available in the official repositories.

Warning: Please back up your /etc/pacman.d/mirrorlist file first

Usage

First back up your /etc/pacman.d/mirrorlist

# cp -vf /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup

The following command will filter the first five mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist:

# reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist

The following command will verbosely rate the 200 most recently synchronized HTTP servers, sort them by download rate, and overwrite the file /etc/pacman.d/mirrorlist:

# reflector --verbose -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist

To see all of the available commands, run the following command:

# reflector --help
Warning: Make sure the mirror list does not contain strange entries before syncing or updating with pacman.