Subscribe: Comments on: 5 useful Mac OS X command line tips you should know
http://osxdaily.com/2008/06/29/5-useful-mac-os-x-command-line-tips-you-should-know/feed/
Added By: Feedage Forager Feedage Grade A rated
Language:
Tags:
background  command line  command  crtl move  ctrl  file  line  mac shell  mac  mode  nohup  shell ctrl  shell  terminal  things work  work mac 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments on: 5 useful Mac OS X command line tips you should know

Comments on: 5 Useful Mac OS X Command Line Tips Everyone Should Know



News, tips, software, reviews, and more for Mac OS X, iPhone, iPad



Last Build Date: Sun, 22 Apr 2018 22:38:41 +0000

 



By: the future

Thu, 24 Sep 2015 19:21:51 +0000

The command line doesn't change much, June 29 2022, September 13 2018, 2015, 2008, 1996, these are all relevant. Good old Unix, eh?



By: xoxo

Thu, 24 Sep 2015 19:07:16 +0000

@ant Jun 29, 2008 :D lol



By: ant

Sat, 11 Apr 2015 09:08:04 +0000

* if you hit ''arrow up'' key you get faster your las inserted command



By: Natty

Fri, 13 Aug 2010 00:32:19 +0000

I added the following to my .bashrc file so that my time-intensive commands wouldn't die if I exited terminal. shopt -u huponexit ulimit -s unlimited



By: Eliza sahoo

Mon, 18 Jan 2010 09:18:23 +0000

Hi, Though i am not a very technical person.but i found your article very informative



By: robig

Thu, 22 Oct 2009 05:29:19 +0000

Expanding the possibilities of !! (last command): !ssh = last command starting with ssh ctrl+r = reverse search in last commands ctrl +d = logout (close terminal if enabled in the terminal options) ctrl +c = abort current command (also when still typing it) cd foo; .. do somtehing in foo ...; cd $OLDPWD there are sooo many more.... im switched from linux to mac btw ;) robig



By: DrewMerkle

Thu, 05 Feb 2009 21:48:19 +0000

The true hackers out there will think I'm explaining the obvious, but for me, these were some good discoveries when I learned them. This seems an appropriate place to add them as comments. The ampersand ("&") at the end of a command is useful for executing that command in the background and returning control to your terminal, but if you log out (close the terminal window, and so on) that command will be killed. Frustrating for those new to the art of the command line. Sometimes the "nohup" command placed ahead of the rest of the command line is quite useful in this regard. "nohup" in this case immunizes a command from a "hang up", which in the dawn of the computer age used to happen to a computer terminal connected via acoustic coupler modem to a mainframe... The ampersand can be combined with "nohup" to immediately send the immunized to the background. Don't forget you can pipe the output to a file with the "> file.txt" sort of thing. Example: nohup command -option -option > output.txt & Even more fun is the "screen" command. "screen" allows you to create virtual text-mode screens which live on the system even when you log out and you can reconnect to them later to interact if needed. Very useful for starting something, going home, having a family life, and then checking back to see if your very long command has done anything useful. Type "man nohup" and "man screen" for more information.



By: Ben Oakes

Sat, 17 Jan 2009 16:41:34 +0000

Note that the control character sequences listed here (i.e. ^L, ^A) are for Emacs mode. If you'd rather use vi keybindings at the shell, you can run `set -o vi`. (To affect other programs, edit your .editrc and .inputrc.) You start off in insert mode and can enter normal mode using or ^[.



By: Pedro

Wed, 14 Jan 2009 18:10:20 +0000

I find the !! (execute last command) really helpful if I forget to type sudo before a command. You can just type sudo !! and the last command will be executed as root (assuming you're in the sudoers file).



By: Antonio

Thu, 23 Oct 2008 10:10:08 +0000

So, all of this is "standard" shell use of many unix boxes... Many more things work also in the Mac OS X shell, like Ctrl-a/Crtl-e to move to the beginning/end of the line, etc A.



By: Antonio

Thu, 23 Oct 2008 10:10:00 +0000

So, all of this is "standard" shell use of many unix boxes... Many more things work also in the Mac OS X shell, like Ctrl-a/Crtl-e to move to the beginning/end of the line, etc A.



By: Sean

Tue, 08 Jul 2008 22:38:57 +0000

Hey, another way to run or rather put a started process in the background is by interrupting the current process with ctrl+z, then typing "bg" to re-activate it in the background. If you happen to need it in the foreground again, simply type "fg". The latter one does also work for processes started in the background with "&".