From: Nicolas Boisselier Date: Mon, 3 Oct 2016 21:56:28 +0000 (+0100) Subject: free for mac X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=3eb7a30108bf7013b51a97f2054b64c7cbbcbaea;p=nb.git free for mac --- diff --git a/etc/profile.d/mac.sh b/etc/profile.d/mac.sh index 587b945e..a4845814 100644 --- a/etc/profile.d/mac.sh +++ b/etc/profile.d/mac.sh @@ -42,6 +42,10 @@ alias macps_top="echo 'TOP PROCESSES:'; ps -Aro'%cpu, ucomm, user' | grep $USER alias mac_vlc_playlists="open -a vlc --args /home/nico/Music/*/*.m3u" alias mac_mount_nfs="sudo mount -o resvport -t nfs" +free() { + vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-23s: %10.2f Mo\n",$1, $2 * $size / 1048576);' +} + mac_config() { declare run r; run=" echo 'Finder path : YES'