How to open a clean terminal in Mac OS X Lion?

Proxify

Whenever I open a terminal, the last used commands appear.

I'd like to get a clean terminal when I open it, but I haven't found how to do it.

For example if while using the terminal I do:

defaults write com.apple.Finder...etc

and then I close the terminal. Next time I open the terminal I will see this same line grayed out (to indicate it's a command I used last time I opened the terminal) and a line to start writing underneath.

Daniel Beck

Add the following at the very end of .bash_profile:

printf '\033c'

This will really clear the Terminal. I even defined the following function, since I didn't like the scrolling behavior of the default clear:

function clear {
    printf '\033c'
}

I think it's the same as a hard reset of the Terminal (Cmd-Opt-R), but I'm not entirely sure.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Mac OS X Lion Terminal SSH connection sharing error

From Dev

How to install Ubuntu on a Mac running OS X Lion?

From Dev

How to install KeePass on Mac OS X Mountain Lion

From Dev

Resume Zsh-Terminal (OS X Lion)

From Dev

I can't clear the terminal in Mac OS X Lion - "terminals database is inaccessible"

From Dev

OS X Mountain Lion terminal tab name + open a new tab in the same directory

From Java

Set environment variables on Mac OS X Lion

From Dev

Hostname issue in Mac OS X Lion

From Dev

MacPorts selfupdate fails on Mac OS X Lion

From Dev

Changing name of Space in Mac OS X Lion

From Dev

All commands are not working on Mac OS X Lion

From Dev

How to correct malfunctioning Terminal in Mac OS X?

From Dev

Mac OS X: how to open vim in terminal when double click on a file

From Dev

How can i get pyodbc installed in Mac OS X 8.5 (Maountain lion OS)

From Dev

How to create an alias in MAC OS that can open a URL in terminal?

From Dev

How can I set mouse sensitivity exactly the same in Windows 7 and Mac OS X Lion?

From Dev

How to isolate Mac OS X installers (e.g. Mountain Lion, Mavericks)?

From Dev

How can I remap the Caps Lock key in Mac OS X Lion?

From Dev

How to use SSH private key to log in without entering passphrase every time on Mac OS X Lion?

From Dev

How to enable the title bar for all windows on Mac OS X Mountain Lion

From Dev

How to allow acces to a symbolic link in my ~/Sites/ for Apache under Mac OS X Lion 10.7.2

From Dev

Mac OS X Terminal not logging in

From Dev

How to install MySQL on OS X Mountain Lion?

From Dev

Mac OS X (Lion) Chrome: shortcut for "Search With Google"

From Dev

Uninstalled Program Icon Stuck on Launchpad in Mac OS X Lion

From Dev

Mac OS X Lion - Xcode components simulator location

From Java

How can I clear previous output in Terminal in Mac OS X?

From Java

How to run C program on Mac OS X using Terminal?

From Dev

How to compile a C program with make on Mac OS X Terminal

Related Related

  1. 1

    Mac OS X Lion Terminal SSH connection sharing error

  2. 2

    How to install Ubuntu on a Mac running OS X Lion?

  3. 3

    How to install KeePass on Mac OS X Mountain Lion

  4. 4

    Resume Zsh-Terminal (OS X Lion)

  5. 5

    I can't clear the terminal in Mac OS X Lion - "terminals database is inaccessible"

  6. 6

    OS X Mountain Lion terminal tab name + open a new tab in the same directory

  7. 7

    Set environment variables on Mac OS X Lion

  8. 8

    Hostname issue in Mac OS X Lion

  9. 9

    MacPorts selfupdate fails on Mac OS X Lion

  10. 10

    Changing name of Space in Mac OS X Lion

  11. 11

    All commands are not working on Mac OS X Lion

  12. 12

    How to correct malfunctioning Terminal in Mac OS X?

  13. 13

    Mac OS X: how to open vim in terminal when double click on a file

  14. 14

    How can i get pyodbc installed in Mac OS X 8.5 (Maountain lion OS)

  15. 15

    How to create an alias in MAC OS that can open a URL in terminal?

  16. 16

    How can I set mouse sensitivity exactly the same in Windows 7 and Mac OS X Lion?

  17. 17

    How to isolate Mac OS X installers (e.g. Mountain Lion, Mavericks)?

  18. 18

    How can I remap the Caps Lock key in Mac OS X Lion?

  19. 19

    How to use SSH private key to log in without entering passphrase every time on Mac OS X Lion?

  20. 20

    How to enable the title bar for all windows on Mac OS X Mountain Lion

  21. 21

    How to allow acces to a symbolic link in my ~/Sites/ for Apache under Mac OS X Lion 10.7.2

  22. 22

    Mac OS X Terminal not logging in

  23. 23

    How to install MySQL on OS X Mountain Lion?

  24. 24

    Mac OS X (Lion) Chrome: shortcut for "Search With Google"

  25. 25

    Uninstalled Program Icon Stuck on Launchpad in Mac OS X Lion

  26. 26

    Mac OS X Lion - Xcode components simulator location

  27. 27

    How can I clear previous output in Terminal in Mac OS X?

  28. 28

    How to run C program on Mac OS X using Terminal?

  29. 29

    How to compile a C program with make on Mac OS X Terminal

HotTag

Archive