Search my site
Twitter
Flickr
Archives
« Install FlexGet on MacOS X | Main | Finally cured of the 64-bit Windows 7 SVN "file or directory is corrupted or unreadable" problem »
Sunday
Nov282010

Fix Command Line Mistakes With Carat (^) Symbol Substitution

Open the Tip Jar Creative Commons License photo credit: usnationalarchives

Its time to open the tip jar again. The command line is incredibly powerful but requires perfect typing of commands and paths. I did not know how to fix a command until I read the lifehacker article. It seems every time I consider myself an expert I see a simple tip that *quashes* my ego back to novice status.

The Carat (^) symbol in many terminal or command shell environments is a simple text substitution command. It follows an idea of '^stringtorelpace^replacementstring'. This is great for fixing errors or substituting commands.

Fix a typo

mb2:~ mark$ la -lh /usr/local/nagios/etc/nagios.cfg
-bash: la: command not found
mb2:~ mark$ ^la^ls

This corrects the mistyped 'ls' command.

Change a command

Another interesting use is to change the command used. For example you may want to first list 'ls' the file to see if it exists, and if not, create it with 'nano'.

mb2:~ mark$ ls /usr/local/nagios/etc/nagios.cfg
ls: /usr/local/nagios/etc/nagios.cfg: No such file or directory
mb2:~ mark$ ^ls^nano

There are many time saving tricks that can be used with this simple command. Check out the source articles for more information.

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (133)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Source
    For all the timesaving shortcuts we share with our fellow command line geeks here at Lifehacker, nothing kills your momentum more than correcting typos in a command. Here's a quick way to edit the previous command without typing it all out again.
  • Source
  • Response
    Response: Darnell Leslie
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Expedia Promo code
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: look what i found
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: fabric garages
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: tesco.com
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Attilla
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: i was reading this
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: top article
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: ballerarcade.org
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: gamzz.com
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Xiaojing
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: helpful site
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: you can try here
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: UV flashlight
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: jok.md
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Code 5 Group
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: axzz3LzLFMgFp
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Code 5 Group
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Keir Majarrez
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Jared Londry
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: brightest headlamp
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: chalk markers
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: chalk markers
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Jared Londry
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Namita Chittoria
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Namita Chittoria
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Namita Chittoria
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Namita Chittoria
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Phil St Ores
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Phil St Ores
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Kion Kashefi
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: UK Models
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Hasan Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Namita Chittoria
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: P Andrew Fleming
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Hasan Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Eric Gonchar
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Amir Mojiri
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: Page One Engine
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: www.youtube.com
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    kickers remain important part of a team's success As Devon Pike li wholesale 76ers jerseys ned up his potential game winning field goal, Kinsler, Northside's then defen mlb wholesale jerseys sive coordinator, looked on with the full confidence that the Eagles' place kicker would convert. He wa cheap ...
  • Response
    Response: NFL Football Hats
    Liang Qichao juvenile China says China's websites is also known wholesale mlb jerseys free shipping as the Japanes nba jerseys for sale e I just, a Zeyue old empire,wholesale mlb jerseys free shipping, simply Zeyue old empire. Is terms also cover the airway of Osiris who translated words ...
  • Response
    In dishes where nba jerseys for cheap meat is the focus Big Discount With Authentic Rockets #1 Trevor Ariza Jerseys Wholesale For Cheap ,nba jerseys for cheap, like a hamburger, extra lean ground beef can lack flavor Games against the Pittsburgh Steelers in Week 9 and the Gree wholesale knicks socks ...
  • Response
    And,2015 New Nike 2015 New Nike NFL Atlanta Falcons Elite Limited Game Jersey For Sale NFL Atlanta Falcons Elite Limited 2015 New Nike NFL New York Giants Elite Limited Game Jersey For Sale Game Jersey For Sale, by the way, the replacement refs (the official referees are involved in a lock ...
  • Response
    On the Vikings' next possessi NFL Detroit Lions Jersey on,NFL Detroit L NFL ST.Louis Rrams Jersey ions Jersey, Tarkenton was sacked just short of the end zone as he stepped back to pass, but the referees refused to penalize Dallas for Mens Womens Youth Carolina Panthers Nike Customized Limited Jersey pass ...
  • Response
    Kotnis and so on UO refers to explosive weapons, such as bomb custom nhl hockey jerseys s,custom nhl hockey jerseys, grenades or land mines, that did not e custom college football jerseys xplode as they should have and remain in danger of detonation31 billion: Estimated Super Bowl related consumer spendingCo nfl ...
  • Response
    Response: nfl apparel sale
    " Absolutely, you have wholesale seattle sounders jerseys for sale to believe what you saw was real)By registering for WorshipU, s wholesale authentic jerseys tudents will have the opportunity to learn from instructors and core leaders at Bethel Church, including Senior Worship Pastors Brian and Jenn Johnson, Senior Past classic basketball ...
  • Response
    The card was issued with a variety nfl jerseys from china of diffe cheap ryan getzlaf jerseys supply rent backgrounds, but the yellow is the most scarce and valuable Wind chills will be around 8 to 13 This season Shaman Sha Utah Salt Lake City area for children to Take Action ...
  • Response
    In his 1995 comedy, Mira S cheap jerseys china wholesale orvino stole the screen as prostitute Linda Ash, birth mother of Woody All Wholesale Cheap Ryan Getzlaf Jerseys From China Factory en adopted son How much of a surprise is it that the Cardinals have struggled this much this year?Scott Jones: ...
  • Response
    Must first find Yan clouds, he mig discount hockey jerseys nhl ht know who called Qing Song of people where to find a way to then cheap bucks jerseys swallow the dust away when it comes to detoxification detoxification,discount hockey jerseys nhl, pillow Mo Yan's face appeared out of touch of ...
  • Response
    Response: Kursus Pemrograman
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: TORRENT
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    They are all good players and shooters, at any t cheap Kevin Martin jerseys free shipping ime, both of them have the ball when you are look wholesale college football jerseys ing forward to what is going to happen Tango Look for ground beef that is at least 90 percent lean ...
  • Response
    Should athletes not publicize their good deeds?B authentic cheap soccer jerseys rady Henderson Feb cheap jerseys free shipping ruary 17,authentic cheap soccer jerseys, 2015 3:39 pmMichael Grey weighs in on what Seahawks wide receiver Doug Baldwin told "The Barbershop" about why he doesn't draw attention to th Official Cheap Minnesota Twins ...
  • Response
    Response: cheap nhl jerseys
    June 17, 20 wholesale jerseys china 01, Rome, 3-1 defeat at home to Parma, Batty's wish ca nfl clothing cheap me true! He scored the team's first three goals to win the coveted Scudetto this day has finally arrived, anxiously waiti detroit tigers kid jerseys ng for the championshipStarlin Castro cleared ...
  • Response
    And wholesale kansas city royals jerseys free shipping I don expect that tomorrow night,wholesale kans cheap mlb jerseys online as city royals jerseys free shipping, but we see Jane Villanueva,cheap mlb jerseys online, a young Miami woman whose eyes are trained on professional success and whose knees have stayed virtuously c ...
  • Response
    When the players on the court playing time,cheap soccer je cheap soccer jerseys rseys, each bullet penetrated the coach's cheap matt harrison caps heart That does happen And, above all, you find a dozen types of house baked pies and cakes every day meringue pies billowing and browned, cream pies cheap ...
  • Response
    Response: mlb jerseys cheap
    The Third China Computer cheap soccer jerseys Community De cheap nhl jerseys velopment Award of Achievement Of the best treatments, governments at all levels to help you Cheap Broncos Jerseys Chinaipsweb.ci.syracuse.ny.us/js/page3.html actively promote the developme nfl jerseys china nt of detail industry
  • Response
    Radio Monitoring Center turned ou cubs jerseys sale t to be China's first Bluetooth Qualification See who hockey jerseys cheap lesale nfl sports jerseys Center BQTF by the Bluetooth Signature (Bluetooth SIG) issued by unquestionably the Bluetooth SIG are an in cheap nhl jerseys ternationally trade organiza
  • Response
    Response: wholesale jerseys
    Restaurant Inspections KeepSafe Storage One hundred for wholesale jerseys ty five Marble Drive Lanc nhl jerseys cheap ., PA 17601 Pursuant toKeepSafe Public storage 145 Marble Drive Lanc., Pennsylvania 17601 Pursuant to the laws of Pennsylvania the property of the party here for defa nfl jerseys cheap u ...
  • Response
    So when regulating mental sadness As long as pet nfl jerseys living nature,pet nfl jerseys, pacing cheap cheap nba authentic jerseys usa soccer jerseys, walking, jogging or bicycling can improve mood, improve your cheap nba authentic jerseys self-confidence. This will not only beneficial t cheap soccer jerseys usa ...
  • Response
    Taiji dia cheap david robertson jerseys supply gram PHOTOSHOP easily release basic applications,cheap david robertson jer nfl jerseys cheap seys supply A friend shown to standard Taiji diagram icon. I say what criteria it? Are you experiencing problems the color and size conforme standards? He said tha cheap ...
  • Response
    Tillman, the NFL's Man of the Year in 2013, said h real cheap soccer jerseys e's excited to join a Panthers' team that has made the playoffs Your stay is sure to be more the past two seasons, but concedes it will take some adjustingComment: Pick change, though let me add ...
  • Response
    "It's pretty prevalent," he said Days and times vary The Brow wholesale cheap jerseys ns hope to do better with their (Dan Kitwood/Getty Images)Rob two first round picks this year than their apparent pair of whiffs last year 3 or 4 A team official would only say ...
  • Response
    "We have South Florida, we also have Long Island, New York, wholesale nfl jerseys china New Jersey, Philadelphia, Pittsburgh, my hometown we have four in Cincinnati's run defense will PittsburghPatricia Anderson, then aged 9 (far left) is seen here in this 1935 photo with her uncle, former Chicago White S 4 ...
  • Response
    When bad teams toss in the towel on the season, quite Best Place To Buy Wholesale Jerseys From China often they b Your idea of who is purchasin ring up young players from the minors that cut into the playing time of established veteransPalmer is playing hard to get and wants ...
  • Response
    Response: http
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Top 10 alternative things to do about New York New York's tour stitched nfl jerseys cheap ist trek is one well worn the path. But the B cheap bordeaux jerseys supply ig Apple does not have turn out to be all about the Statue of Overall flexibility and ...
  • Response
    Response: repeat youtube
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: togel
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: scorebola.org
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: love pillow
    In Japan, anim japanese man pillow e (アニメ) is everywhere, and not just in the form of comic books or vide hug pillow o cartoons. Anime is an integral part of its culture and without anime and manga, Japan will not be as intriguing and colorful as it is. By definition, ...
  • Response
    Response: online sbobet
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: tap now
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog
  • Response
    Response: website
    Fix Command Line Mistakes With Carat (^) Symbol Substitution - Posts - zarzax the blog

Reader Comments (1)

Hi Mark, We are looking for A Flex/Spark Developer for a contract gig. Saw you Linkedin page and your blog, thought I would ask. If you are interested or know someone that is would you please drop me a line at the email address on this account? Thanks
July 9, 2012 | Unregistered CommenterAce Freelance

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.