A terminal is a hardware device used for entering data into and displaying information from a computer. Terminals were frequently used in the days of mainframe computers. Today, most operating systems offer text-based "terminal emulators", which replicate the functionality of a classical terminal, ...

learn more… | top users | synonyms

5
votes
4answers
28k views

How do I recursively remove subdirectories and files, but not the first parent directory?

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf However, ...
5
votes
5answers
4k views

Can you find out the IP SSH-ing your computer?

If computer A SSHs computer B, can computer B find the IP of computer A? If so, how?
5
votes
2answers
6k views

How to open a terminal quickly from a file explorer at a folder in Windows 7? [duplicate]

Possible Duplicate: Windows Console in Explorer Context Menu This can be done easily in Ubuntu, just right click and open Terminal. It is very inconvenient to open cmd.exe then cd to the ...
5
votes
3answers
3k views

OS X Terminal Tutorials [closed]

So, I am started to get settled into everyday life with my Mac now and want to be able to utilise the power of the Terminal. Can you provide any good tutorials or sources which will help me learn?
5
votes
2answers
7k views

change background and font colors in mac terminal

is it possible, I want to change the color the white background is not too appealing.
5
votes
3answers
2k views

Change Directory (cd) to Network Share (Windows XP) in Ubuntu

How do I navigate in the terminal to a Windows network share? I can access the Windows work-group using the GUI but I would like to get there in bash.
5
votes
1answer
760 views

Mac OS X: Is there a straightforward way to color ls output according to Finder label colors?

I have a client with a directory tree that has a number of high-level directories that I need to have on my local development machine. I rarely look at them unless something goes awry. I've marked ...
5
votes
4answers
13k views

Accessing shared directory path in Mac OS X Terminal

I'm trying to access a shared network server via terminal on the Mac. I can obviously access directories on the same system using just the command cd (e.g. cd /Applications) but our shared network I ...
5
votes
2answers
2k views

ssh sessions in xterms freeze for many minutes whenever they disconnect

If I ssh to a remote machine and then lose internet connectivity, the session freezes. I can't control-c or otherwise abort and go back to my local xterm or terminal prompt but if I wait several ...
5
votes
4answers
4k views

GNOME Terminal - process name in tab title

How can I put the current running process name into a GNOME Terminal tab title (or title bar when there's only one tab)? -- UPDATE -- To clarify, I want the tab title to update when I run a process, ...
5
votes
3answers
8k views

Clear terminal using keyboard shortcut

I was curious if there is a way to clear the terminal buffer/output through some keyboard shortcut. I am using Ubuntu. I am aware that Ctrl + L clears the terminal, but you can still scroll back to ...
5
votes
5answers
4k views

Clearing terminal

I would like to issue a command from a bash script to clear the terminal it is running from: I don't want to clear the bash history (history -c) I don't want to issue the clear command (which ...
5
votes
3answers
1k views

In Ubuntu OS, my “arrow keys” are not arrow keys

Instead, they give A, B, C, D I am using vi.
5
votes
2answers
189 views

Can I have a bunch of tabs set up when I launch Terminal?

Every morning I launch the OS X app Terminal and tediously set up a bunch of tabs... A ssh session to a certain server ($ ssh ...) A script/console session for the Rails app I'm working on ($ cd ...
5
votes
3answers
2k views

Switching tabs in Mac terminal with Ctrl+PageUp/PageDown

I've recently started using a Mac (running Lion), and there is one inconsistency that's getting to me. In Chrome and MVim, I can switch tabs with Ctrl+PageUp/PageDown. But, in the Terminal, I have ...
5
votes
4answers
5k views

How to execute a shell script with selected files/folders in finder?

I'm coming from Linux where it's easy to run a script against a set of files in nautilus or dolphin, but I was kind of surprised to see that this isn't easy in OSX. Preferably, I would love to be ...
5
votes
4answers
8k views

How do I write code of more than 1 line in the Python interpreter?

I have a problem coding Python in terminal. I'm just learning basics so I have no need to create .py files. In terminal I can run one line of code in the Python interpreter, but how do I write more ...
5
votes
1answer
146 views

Can I scroll Terminal down when there is nothing to scroll?

When I reach the bottom line, I want to be able to “scroll” down the virtual space so the prompt is at the top again (like in the beginning): Is there any way to do this? This becomes even more ...
5
votes
2answers
4k views

How to make Terminal bounce its application Dock icon in OS X

In OS X, when a program wants attention, its Dock icon at the bottom will bounce up and down. In Terminal, sometimes I will run a long series of commands, like this: a && b && c I ...
5
votes
4answers
1k views

Emacs: What features or benefits are unique to either GUI or terminal interface?

Emacs can be launched in it's own GUI window or within a terminal (using the -nw flag). What features or work-flow benefits are only available in one mode or the other? I.e. If a user habitually uses ...
5
votes
1answer
683 views

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

1) In Mountain Lion, through Preferences, you can change the setting of Terminal so that a new tab can be opened in the same directory as the opening tab. (i.e. if I am at ~/workspace and I open a new ...
5
votes
3answers
9k views

How to reset Bash on Mac OSX, .bash_profile corrupted and bash no longer works

I am on a MacBook Pro, running the latest version of Mountain Lion. I really need some help, I have managed some how to damage my .bash_profile (I think) so that every time I open up the terminal I ...
5
votes
1answer
420 views

Pasting into vim from GUI results in missing lines

When I copy text from an OS X GUI app (e.g. Firefox) and paste it into vim in my terminal, it's often missing the first few lines or characters, with no obvious pattern. This may not be vim ...
5
votes
3answers
1k views

what is the command+k ( in mac ) equivalent in ubuntu

I am used to command + k to clear up the terminal in mac. It is very helpful specially while debugging through server logs. What is the equivalent in Ubuntu system ?
5
votes
3answers
11k views

Increase linux terminal scrollback buffer size

I'm using CentOS 5.4 servers installed in a VMWare virtual machine with no X.Org server installed, so all access is via command line and the linux terminal. I use Shift-PgUp to view the scrollback ...
5
votes
3answers
2k views

Mac OS X Terminal.app: How to select pathnames?

I used iTerm for some time and switched now back to the Terminal.app again. One nice feature about iTerm is that double clicking on text does not select the word under the cursor, but rather the ...
5
votes
3answers
3k views

Mac OS X Terminal - Remap Command Keys

Is there a way to remap command keys just for Terminal.app in Mac OS X? I know that I can remap keys at the system level, but I'd like a way to do it just for the Terminal app. Ideally I'd like ...
5
votes
6answers
3k views

Why doesn’t windows explorer show my removable / USB drive even though the command prompt does?

I'm running WinXP SP2. Around 50% of the time, when I slot in my USB drive. Windows explorer refuses to show the drive. If I click on the Safely remove hardware icon on the tray, I can see a menu ...
5
votes
2answers
1k views

What's the difference between ^S and ^Z inside a terminal?

When using a terminal emulator, one can stop the currently running program with either CTRL-Z or CTRL-S. What's the difference between these control characters?
5
votes
1answer
497 views

'@' sign on mac commandline

What does a '@' sign mean in mac command line next to file permissions? -rw-r--r--@ 1 user staff 1111 May 3 15:10 MyFile.txt
5
votes
6answers
4k views

GNOME Terminator for Mac? [closed]

does anybody of you know a application like GNOME Terminator for Mac? I want to split my terminal into 2 or 4 seperate windows.
5
votes
2answers
9k views

How can I get Mac OS X's proxy information in a Bash script?

I have several network locations set up on my laptop: Work, Home, etc. The work one(s) all have a proxy server set up, while the others don't. This works fine for OSX applications -- Safari, Mail, ...
5
votes
2answers
133 views

Getting rid of GNU Emacs's menu bar in terminal windows

How to get rid of Emacs's menu bar in terminal windows? The standard answer is to put (when (not (display-graphic-p)) (menu-bar-mode -1)) in init.el. However, this solution is not good, because ...
5
votes
2answers
1k views

How to scroll up in terminal window while new input is generated without beeing thrown back to the bottom (Linux)

In Ubuntu, I want to scroll up while a command is running in my terminal window and generates new output (actually the command running is rspec). I can scroll up, but each time rspec generates a new ...
5
votes
1answer
991 views

why is screen not showing the current running process name? (Mac OSX Terminal bash)

I am running screen inside Mac OSX Terminal app (bash). Here is the screenrc (got it from here): $ cat ~/.screenrc termcapinfo xterm* ti@:te@ startup_message off defutf8 on shelltitle "$ |what?" # ...
5
votes
1answer
7k views

How to save environment variable from Terminal?

I am trying to save the PATH environment variable from the Terminal running on a Ubuntu system. I typed in the following however it does not get saved. export ...
5
votes
3answers
1k views

How to use Mac OS X's Summary Service on the command line?

Can the 'summary service' be used on the command line in Mac OS X? I have already tried piping, using the text file as an argument and sending the text file as stdin.
5
votes
2answers
891 views

Change directory cd to another terminal's cwd

I would like to create a command like cd - (lets call it cdp) that will change directories to the last changed-to directory from another terminal window similar to the option to open a new terminal in ...
5
votes
1answer
750 views

Wake a Mac display from sleep via SSH

I'm using Jenkins as a CI server, where I'm SSHing into an iMac running OS X Mountain Lion (10.8.4) to run some UIAutomation integrations tests on an iOS app. The iMac actually sits 10 ft from me (but ...
5
votes
3answers
1k views

BASH history truncated to 500 lines on each login

For some reason, I cannot get my system to keep my BASH history after a reboot. Here are the relevant sections of my ~/.bashrc: shopt -s histappend PROMPT_COMMAND='history -a; updateWindowTitle' ...
5
votes
1answer
88 views

Can one install linux on a Mac via ssh?

Title says it all, read on if you think this an odd request. I realize that this question is quite unusual, but ssh and FTP are the only access methods for my Mac. Why I'm doing this: The ...
5
votes
2answers
2k views

How can I make terminal Vim look as good as MacVim?

I'm using the same color scheme for Vim both in the Terminal and in MacVim, but they end up getting totally different colors. Terminal: and MacVim: Why is this happening? It does this with ...
5
votes
2answers
1k views

Why does the terminal in unity 2d (Ubuntu 11.10) always stay in the foreground?

I have just updated to Ubuntu 11.10 and I am using unity 2d. My terminal applications (gnome-terminal or konsole) just won't go into background. When I move another application in front of them, they ...
5
votes
1answer
196 views

Terminal / Editor themes for colourblindness?

I "suffer" (not really) from a difficult-to-diagnose form of colourblindness. It generally corresponds with red-green colourblindness, but there are some quirks. There's a definite cognitive element ...
5
votes
3answers
311 views

How do I detect when I a terminal gets focus in Linux?

I want to be able to time how long I spend in front of a terminal. I'm thinking the best way will be to have some sort of timer that starts and stops when the terminal gains/loses focus. And it will ...
5
votes
1answer
3k views

How to enter copy mode on mouse scroll in tmux?

The mouse scroll wheel does not work when not in copy mode. I'm not sure whether it is supposed to be working then? When in copy mode, the scroll wheel does work. The problem is that I still need to ...
5
votes
1answer
418 views

How to make emacsclient uses differnt themes in terminal and X window?

Sometimes I use emacsclient -t -a '' in xterm, and sometimes I use emacsclient -c as a GUI application. What annoys me is that the font settings and color-theme are initialized when emacs server ...
5
votes
1answer
254 views

Linux diary program

Is there a diary program for Linux that runs in the terminal?
5
votes
1answer
122 views

Open new Finder tab when using 'open .' in the Terminal

In the Terminal I use open . to open the current directory using Finder. Open folders in new tabs settings is set in the Finder, yet it opens a new window every time. By the end of a project/day I ...
5
votes
1answer
359 views

Nohup & Sass: Process keeps running but, after a while, *.scss files do not get compiled

I am using Sass on a CentOS 5.8 server and want it to keep running after SSH logout, so that other users can edit *.scss files for days or even weeks to come without any need to start the program each ...