Shell & Unix

    • Supported in Unix environments.
    • Can also gzip
    • -c create an archive (files to archive, archive from files)
    • -x extract an archive (archive to files, files from archive)

    Options

    • -f FILE name of archive - must specify unless using tape drive for archive
    • create/extract archive with gzip/gunzip
    • -j create/extract archive with bzip2/bunzip2
    • -J create/extract archive with XZ

    To compress

    tar -czvf myfiles.tar.gz myfiles/

    To uncompress

    tar -xzvf myfiles.tar.gz

    How to check your memory processes

    • top

    Check how much memory is used vs free

    Check all the memory each process is consuming

    • ps aux --sort -rss | head -n 15

    kill an unresponsive process on Unix

    • ps aux | grep <service name>
    • find its process id (PID)
    • kill -9 PID

    Check Node traffic on specific port

    • sudo tcpdump -A -i lo port 2354

    to get unix my ip address

    ssh