LINUXOPOLIS # 09-JANUARY-2019 ~ RAMDISK

RAMDISK

Building a Linux Habitat
Published with SteemPeak
home previous

screenshot by willi glenz

$ vim ~/.config/fish/functions/gramdisk.fish

function gramdisk --description 'ramdisk'
    clear; echo
    echo '==========================================================================='
    echo '                                  RAMDISK                                  '
    echo '==========================================================================='
    echo ' $ free -h    : free ram for a new tmpfs                                   '
    echo ' $ df -hT     : active tmpfs                                               '
    echo '---------------------------------------------------------------------------'
    echo 'permanent-tmpfs                                                            '
    echo '---------------------------------------------------------------------------'
    echo ' # mkdir -p /media/ramdisk                                                 '
    echo ' # chmod 777 /media/ramdisk/                                               'update
    echo ' # vim /etc/fstab                                                          '
    echo '   ramdisk /media/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1G 0 0 '
    echo ' # mount -a                                                                '
    echo ' $ mount | column -t                                                       '
    echo ' # umount ramdisk                                                          '
    echo ' $ mount | column -t                                                       '
    echo '---------------------------------------------------------------------------'
    echo 'temorary-tmpfs                                                             '
    echo '---------------------------------------------------------------------------'
    echo ' # mkdir -p /media/ramdisk                                                 '
    echo ' # chmod 777 /media/ramdisk/                                               'update
    echo ' $ mount | column -t                                                       '
    echo ' # mount -t tmpfs -o size=1024M ramdisk /media/ramdisk                     '
    echo ' # mount -a                                                                '
    echo ' $ mount | column -t                                                       '
    echo ' # umount ramdisk                                                          '
    echo ' $ mount | column -t                                                       '
    echo '==========================================================================='
    echo
end
SOURCES
 man-pages ..................................... $ man mount umount mkdir vim df free
 ubuntuwiki (de) ............................ wiki.ubuntuusers.de/RAM-Disk_erstellen/
H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
Join the conversation now