You are not logged in.
Pages: 1
[crew@myhost pacman.d]$ cd /etc/pacman.d
[crew@myhost pacman.d]$ sudo cp mirrorlist mirrorlist.backup
[crew@myhost pacman.d]$ sudo rankmirrors -n 6 mirrorlist.backup > mirrorlist
-bash: mirrorlist: Permission denied
[crew@myhost pacman.d]$
I can't seem to fix this.
And in the midst of such perfection,
I can't help but feel diseased.
Offline
Same results when using 'sudo', but works when using root proper 'su'.
Offline
Only rankmirrors is run as root, the redirection is still made by the shell running as user.
A work around is to invoke another shell which will be run as root :
sudo sh -c "rankmirrors -n 6 mirrorlist.backup > mirrorlist"
Or you can just redirect the output to a file where you user can write, e.g. /tmp/mirrorlist, then move it.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
you can also pipe it to tee:
$ rankmirrors -n 6 mirrorlist.backup | sudo tee mirrorlist
Offline
Pages: 1