Skip to content

Instantly share code, notes, and snippets.

@bartmika
Last active October 13, 2015 17:46
Show Gist options
  • Save bartmika/37b63a352c322b898893 to your computer and use it in GitHub Desktop.
Save bartmika/37b63a352c322b898893 to your computer and use it in GitHub Desktop.

Useful FreeBSD Commands

who

This command shows who is currently logged onto the system.

screen

Description

screen will allow you to save your session, hang up, and at a later time reconnect and restart your session.

Install

cd /usr/ports/sysutils/screen
make install clean
rehash

Usage

To start up the screen session simply enter into your command the following

screen

Now you can start running whatever long processes you have. For example:

python really_long_process.py

To leave the screen session and have it continously running then:

  1. Hold the Control button from your keyboard

  2. While holding Control then proceed to pressing the a button

  3. Finally while still holding those two keys, press d button

  4. You will have exited the screen session while the process will continue running regardless if you logout/log back in.

To resume the screen session, simply type:

screen -r

More Information

How Do I Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD?

Source: http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/

du -a /var | sort -n -r | head -n 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment