Find the answer to your Linux question:
Results 1 to 3 of 3
anybody know the command for find in nano text editor. How do I locate a specific word in a large config file?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    27

    'Find' function in nano text editor?


    anybody know the command for find in nano text editor. How do I locate a specific word in a large config file?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,391
    Press <Control> + w :: ^W Where Is

    <Control> + g :: Help
    You must always face the curtain with a bow.

  3. #3
    Linux Newbie
    Join Date
    Apr 2005
    Location
    Clinton Township, MI
    Posts
    104
    Quote Originally Posted by papazulu View Post
    anybody know the command for find in nano text editor. How do I locate a specific word in a large config file?
    ^W (F6) Search for a string or a regular expression

    ^W is short hand for holding down the Ctrl key and pressing W. (F6), an alternate binding, means that you can press the function key, F6, if you have one (but most keyboards these days do).

    Press Ctrl G to get help on any nano command. There are not a great number of them, so it's pretty easy, once you work with it a while, to get to know them.

    One other comment: I don't know how large is "large", in your case, but if you're talking about 100-300 lines, no big deal. If, however, you are talking about 5-10,000 lines or more of something, you really may want to consider learning a more advanced tool than nano. I find nano to be perfect for small, simple tasks, but I don't consider it to scale very well. I do often use nano for really small stuff, or I'll use a Notepad-like graphical editor, such as Leafpad or Mousepad for simple clipboard, cut, copy, and paste type stuff. But if there is a great deal of search and replace or more involved editing, that's when I turn to much more complicated, but also much more powerful editing tools. If I'm on an open system, I use either Vim or GNU Emacs, depending on what I'm doing. If it's writing code, it's definitely Emacs. If I am writing prose, then editing it, I'm more likely to use Leafpad or NEdit to write, and Vim or Emacs to edit, assuming this is a big effort, requiring multiple sessions.

    When I'm doing work that favors the use of one tool, then it's definitely Emacs for me. But any of these tools can get the job done; it's more a matter of how fast and effectively you want your work and your accomplishments to be, and how much effort (or wasted time going up and down the document) you want to spend, and that's why I know several tools. One of them is bound to be on the platform that I am using.
    Brian Masinick
    masinick AT yahoo DOT com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •