Archive

Articles taggués ‘Mac OS X’

Aria2 – L’outil de téléchargement ultra rapide

10/01/2024 Comments off

Source: korben.info

Les barbus du Linux le connaissent depuis longtemps, mais pour les autres, je vous explique rapidement. Tout d’abord Aria2 est sous licence GPL et tourne sans aucun souci sous Mac, Linux, Windows et même Android. L’outil est léger (il consomme peu de CPU et de mémoire), mais surtout très puissant puisqu’il gère en plus des liens classiques, les Metalink, ce qui lui permet de télécharger des fichiers en exploitant plusieurs connexions simultanées utilisant plusieurs sources et/ou protocoles différents.

Oui c’est fou ! Cela permet d’exploiter au maximum la bande passante que vous avez à votre disposition.

Aria2 supporte donc le HTTP, FTP, mais aussi Bittorrent avec toutes ses fonctionnalités (DHT, chiffrement PEX, URI magnétique, Web-Seeding, téléchargement sélectif, tracker UDP et le protocole Local Peer Discovery). Aria2 est aussi pilotable à distance (support RPC) et gère sans souci ce qui est droit d’accès, cookies, proxys…etc.

N’allez pas croire que Aria2 est un outil compliqué à prendre en main. Taratata, c’est au contraire très simple à piger, comme vous allez voir dans les exemples ci-dessous :

Pour télécharger simplement un fichier :

aria2c http://example.org/mylinux.iso

Pour télécharger un fichier à partir de 2 sources différentes (HTTP, FTP) :

aria2c http://a/f.iso ftp://b/f.iso

Pour télécharger un fichier à partir de 3 connexions de source différente (Torrent, FTP, HTTP) :

aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"

Si ça vous branche d’explorer un peu plus ses possibilités, la documentation est ici. Autrement, sachez aussi qu’il existe des interfaces graphiques pour Aria2 comme :

  • webui-aria2: Interface navigateur
  • uGet: Gestionnaire de téléchargement Linux

Aria2 est téléchargeable ici.

Categories: Réseau, Système Tags: , ,

Fixing Mac OSX File Permissions and ACLs From the Command Line

09/01/2024 Comments off

Recently the hard drive in my mac mini running Mac OSX Leopard (10.5) failed. Luckily I had time machine backing it up to an external USB disk. Now, since I had to replace the drive and rebuild my system anyway I figured, why not upgrade to Snow Leopard? Planning to just pull what I needed off the backup drive manually I went ahead with the upgrade. There aren’t too many files on this machine that I depend on. Just some ssh keys, gpg keys and random documents scattered about here and there. So I upgraded, installed my apps and copied my files from the backup. Everything was going smoothly until I tried to actually write to one of the files I copied from the backup drive. This is when I started getting permission errors.

Here’s what happened when I tried to update my ssh known_hosts file:

airbag:~ keith$ echo foo > .ssh/known_hosts 
-bash: .ssh/known_hosts: Permission denied

Huh? But I own this file…dont I?

airbag:~ keith$ id
uid=501(keith) gid=20(staff) groups=20(staff),402(com.apple.sharepoint.group.1),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),401(com.apple.access_screensharing)

airbag:~ keith$ ls -al .ssh/known_hosts 
-rw-r--r--@ 1 keith 502 56140 Mar 25 2009 .ssh/known_hosts
I do own it… And so began much head scratching and man page reading.

Well, as it turns out I forgot to look at the file ACLs…

airbag:~ keith$ ls -le .ssh/known_hosts 
-rw-r--r--@ 1 keith 502 56140 Mar 25 2009 .ssh/known_hosts
 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown

Well no wonder, the ACL is set to deny write,delete,append,writeattr,writeextattr and chown from everyone! Let’s get rid of that.

airbag:~ keith$ sudo chmod -N .ssh/known_hosts 
Password:

That ought to do it. The -N flag says get rid of all the ACL info on the file. You could also update this to be just right for your user or group but I’d rather use only the standard unix permissions.

airbag:~ keith$ ls -le .ssh/known_hosts 
-rw-r--r--@ 1 keith 502 56140 Mar 25 2009 .ssh/known_hosts

Seems to have removed all ACLs from the file. I wonder if we can write to it now…

airbag:~ keith$ echo foo >> .ssh/known_hosts 
airbag:~ keith$

And there you have it, the file is writable once again. Now its time to get some real work done!

Categories: Système Tags: , , , ,

Change & Set the Default crontab Editor

08/01/2024 Comments off


Most hardcore command line users and unix geeks love vi, but I prefer nano. If you want to change your default crontab editor to nano, here’s how to do this:

For a one time edit, launch the terminal and type:

EDITOR=nano crontab -e

If you want to set nano as your default editor in general, you use this command:

export EDITOR=nano

Now when you go to edit crontab, nano will be the default editor than vi. You can test this by typing:

crontab -e

Looking beyond Mac OS X, this should work in Linux as well.

Categories: Système Tags: , , , ,

Automatically Connect to a Network Drive on Mac OS X Start Up & Login

02/01/2024 Comments off

It can be helpful to configure Mac OS X to automatically mount shared network drives, this is particularly true for those of us who regularly connect to a network drive for file sharing or backups.

Setting up automatic network drive connections in OS X is a two-step process, you must mount the drive, then you add it to your automatic login items. This should work flawlessly in most versions of OS X, but we’ll cover an alternative approach that uses Automator to mount a network drive automatically on login as well.

1) Mounting the Network Drive

If you’re already familiar with mapping a network drive in Mac OS X you can skip the first part of this and go straight to System Preferences in the second section.

  1. From the OS X desktop, pull down the “Go” menu and select “Connect to Server”
  2. Connect to the server and mount the drive you want to automatically connect to on boot
  3. Choose Guest or for a specific user check the box next to “Remember this password in my keychain” – you must select to remember the password otherwise the automatic login event can not happen without logging into the network drive

Next, you add the network drive to automatically connect on OS X by bringing it into your Login Items list.

Lire la suite…

Categories: Réseau, Système Tags: , ,

Trashing files not going to the trash bin

01/01/2024 Comments off

Click on the item in the Finder’s sidebar with the house icon and verify that you are able to write to this folder in the Ownership & Permissions section of the Get Info window, and that it isn’t locked; if it is already set this way and you get that error, open the Terminal in the /Applications/Utilities/ folder and run the following:

mkdir ~/.Trash

If you get a message stating that the folder exists, run the following:

sudo chown $UID ~/.Trash
chmod u+rwx ~/.Trash

The first command in the second set will prompt you for your administrator password; nothing will appear in the Terminal window while it is being typed. In either case, click on the Finder icon in the Dock with the Control and Option keys pressed, and relaunch it.


Categories: Système Tags: ,