A nano szövegszerkesztő használata

 

Aki parancssorban dolgozik, előbb utóbb belebotlik valami szövegszerkesztőbe. A legtöbb disztribúcióban a vi az alapértelmezett eszköz a config fájlok átírásához. Ez egy elég kemény dió egy kezdő linuxosnak. A használata felér egy önkínzással, tehát hagyjuk meg ezt az örömet a tapasztalt linuxosok és a mazochistáknak :-)

Szerencsére a Debian alapú rendszereknél, alapból ott lapul a nano szövegszerkesztő is.

A program nano [opciók] [fájlnév] formában indítható. Az opciók listáját a -h kapcsolóval kapjuk meg.

A nanonak nincsenek különféle módjai mind az előbb említett vi szerkesztőnek, így rögtön indulás után szerkesztheted a szöveget. Ha egy config fájlt szerkesztesz (mint például az /etc/fstab), akkor használd a -w kapcsolót:

nano -w /etc/fstab

Ez kikapcsolja a sortörést. Ennek az ellenkezője a -$, azaz: laza sortördelés engedélyezése.

Új fájl létrehozásához:

nano fájlnév

A nano vezérléséhez billentyűkombinációkat használunk. Minden parancs a Ctrl+betű vagy Alt+betű formában adhatók ki. A leggyakrabban használtak a nano felületének alsó részén, a segítség ablakban jelenik meg. Ez a funkció kikapcsolható (de nem érdemes!) ha a -x kapcsolóval indítottuk a programot.

 

Ha indításkor megadtuk a fájlnevet, akkor a fájlnak a tartalmát puffereli. A pufferelt tartalomban a nyílbillentyűkkel mozoghatunk. A változtatások nem kerülnek kiírásra addig, amíg a pufferelt tartalmat vissza nem írjuk a fájlba. Magyarul, elmentsük a fájl. A változtatások mentéséhez használd a Ctrl+O parancsot (tartsd lenyomva a Ctrl-t és közben nyomd le a O-t is). Ha nem adtunk meg fájlnevet akkor most kérdezi meg hogy milyen fájlba akarunk menteni. Kilépéshez nyomd meg a Ctrl+X billentyűkombinációt.

 

Szöveg másolása és beillesztése mind a grafikus felületen megszokott módon nem lehetséges. Ezért trükközni kel egy kicsit. Használd a Ctrl+K parancsot egy sor kivágásához. Ennek hatására az adott sor eltűnik. Ezután vidd a kurzort oda, ahová be akarod illeszteni, és nyomj Ctrl+U. A sor újra megjelenik. Több sort kivágni, többszöri Ctrl+K ismétlésével tudsz elérni, majd egyetlen Ctrl+U megnyomásával tudod a kivágott sorokat beilleszteni.

Ha a sornak csak egy része kel, akkor ki kell jelölnöd a szöveget. Vidd a kurzort a kivágandó szöveg elejére és nyomj Ctrl+6 (vagy Alt+A). Most vidd a kurzort a kivágandó szöveg végére. A kurzor mozgatás hatására a szöveg ki lesz emelve. A kijelölés megszüntetésére nyomj újra Ctrl+6. Nyomj Ctrl+K a szöveg kivágásához, majd Ctrl+U-val illesztheted be a kívánt pozícióba.

Szöveg részek kereséshez használd a Ctrl+W parancsot és írd be a keresendő szöveget, majd nyomj Enter-t. A következő találat kereséséhez nyomj Alt+W.

 

A sorok számozása nincs bekapcsolva. Ha ezt a funkciót is használni akarod, akkor indítsd a nano -c opcióval. A sorszámozás a segítség ablak felett jelenik meg.

nano –c fájlnév

Sorok számozásának bekapcsolása

Általában a nano-val konfig fájlokat szerkesztünk. Érdemes mindig biztonsági mentést készíteni a szerkesztett fájlokról. Ha véletlenül rosszul sül el valami, akkor is vissza tudjuk állítani az eredeti helyzetet. Ehhez a nano szövegszerkesztő egy egyszerű kis kapcsolóval (-B ) - azaz nagy B betű - segítségünkbe lehet.

nano –B fájlnév

Biztonsági mentés készítés a szerkesztett fájlról. A biztonsági másolat ugyan aban a könyvtárban marad fájlnév~ néven.

 

Néhány fontosabb billentyűkombináció a nano használatához:

 

Ctrl+G

a funkciók teljes listája (a leírás oldalai között Ctrl+Y és Ctrl+V-vel mozoghatunk)

Ctrl+R

fájl beolvasása, beillesztése (a fájl tartalmát az aktuális kurzorpozíciótól illeszti be)

Ctrl+W

keresés a szövegben

Alt+W

ugrás a következő keresési találatra

Alt+6

az aktuális sor vagy a kijelölt terület másolása (copy)

Ctrl+6

kijelölés - a billentyűkombináció leütése után használjuk a kurzormozgató nyilakat a kijelöléshez

Ctrl+K

az aktuális sor kivágása (cut)

Ctrl+U

a vágólap tartalmának beillesztése (paste)

Alt+U

visszavonás (undo)

Alt+D

karakterek, szavak és sorok számlálása

Hozzászólások

Hey would you mind sharing which blog platform you're
using? I'm going to start my own blog soon but I'm having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design seems different then most blogs and I'm looking for
something completely unique. P.S Apologies for getting off-topic but I had to
ask!

Feel free to surf to my weblog; manicure

I have been surfing online more than 2 hours today, yet I never found any

interesting article like yours. It's pretty worth enough

for me. In my opinion, if all website owners and bloggers

made good content as you did, the web will be much more useful than ever before.

Also visit my web blog ... minecraft (tinyurl.com)

Hi terrific website! Does running a blog such as this take a lot of work?

I've no understanding of computer programming

but I was hoping to start my own blog in the near future.

Anyway, if you have any suggestions or tips for new blog owners please share.

I understand this is off subject however I just wanted to ask.

Kudos!

my homepage - quest bars cheap (tinyurl.com)

Aw, this was a really good post. Taking the time and actual effort to generate a very good article…

but what can I say… I procrastinate a whole lot and don't seem to get nearly anything done.

Stop by my blog ... asksylphoflight.tumblr.com sling tv

Pretty nice post. I simply stumbled upon your weblog and wished to say that I have truly enjoyed surfing around your weblog posts.
After all I'll be subscribing on your feed and I am hoping you write once more very soon!

Feel free to surf to my blog post :: Tommy

Oh my goodness! Amazing article dude! Many thanks, However I am going through troubles
with your RSS. I don't know the reason why I cannot join it.
Is there anybody having identical RSS issues? Anybody who knows the answer can you kindly respond?
Thanx!!

Visit my web-site ... zephaniah.design.blog

I like what you guys are usually up too.
This sort of clever work and coverage! Keep up the great
works guys I've included you guys to my own blogroll.

my blog ... 이윤희 바둑이

Thanks very nice blog!

Also visit my page; Troy

Yeah bookmaking this wasn't a risky conclusion great post!

Feel free to visit my blog :: www.hltkd.tw

Elektromıknatısın oluşturduğu manyetik alan, mıknatısın manyetik Elektromıknatıs, bobin içine yumuşak demirin konulmasıyla yapılır.

My homepage - Brandi Love Lesbian Massage Porn Videos Sex Movies

Greetings from Ohio! I'm bored to death at work so I decided to check out your blog on my iphone during
lunch break. I love the information you present here and can't wait to take a
look when I get home. I'm amazed at how quick your blog loaded on my cell phone ..
I'm not even using WIFI, just 3G .. Anyways, amazing
site!

My website ... Vonnie

Heya outstanding blog! Does running a blog like
this take a great deal of work? I have virtually no expertise in computer programming however I was hoping to start my own blog in the
near future. Anyhow, should you have any suggestions or techniques
for new blog owners please share. I know this is off subject nevertheless I just wanted to ask.
Thanks a lot!

My website ... 에볼루션 카지노

It's really very complicated in this busy life
to listen news on TV, therefore I just use internet
for that reason, and get the hottest news.

Feel free to visit my website 텍사스 홀덤

Can you tell us more about this? I'd want to find
out some additional information.

Feel free to surf to my homepage - 카지노 777

I really like what you guys are usually up too.
This kind of clever work and reporting! Keep up
the fantastic works guys I've added you guys to my blogroll.

Here is my web page ... Nina

Great website. Lots of useful info here. I am sending it to some friends
ans additionally sharing in delicious. And naturally, thanks in your sweat!

My web page ... Shavonne

Thanks for one's marvelous posting! I quite enjoyed reading it, you're a great author.
I will always bookmark your blog and will often come back later
on. I want to encourage one to continue your great writing,
have a nice afternoon!

my homepage :: www.comegnolaw.com

Ahaa, its good dialogue about this paragraph here at this blog, I have
read all that, so now me also commenting at this place.

my website :: https://forum.lostworldadventure.com/

Write more, thats all I have to say. Literally, it seems as though you relied on the video to
make your point. You clearly know what youre talking about,
why throw away your intelligence on just posting videos to your blog when you could be giving us something informative to read?

Here is my web blog marketing online

Hello there! Do you know if they make any plugins to
safeguard against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any
tips?

my blog 7 포커 확률

Definitely consider that that you stated. Your favorite reason appeared to be at
the web the simplest thing to keep in mind of. I say to you,
I certainly get annoyed while other people think about worries
that they just do not realize about. You controlled to hit the nail upon the top and also outlined
out the whole thing without having side-effects , other people could take a signal.
Will probably be back to get more. Thanks

Also visit my page; 포커 룰

What's up, I check your blogs daily. Your story-telling
style is awesome, keep doing what you're doing!

My web page - gamelaufree.com

I do agree with all the concepts you have offered on your post.
They are really convincing and will certainly work. Still, the posts are too
brief for starters. Could you please extend them a
bit from subsequent time? Thanks for the post.

Feel free to surf to my web blog - seed bank

Hey, you used to write wonderful, but the last several posts
have been kinda boring? I miss your great writings.
Past several posts are just a little bit out of track!
come on!

My site :: oil pulling teeth whitening

Yesterday, while I was at work, my sister stole my
iPad and tested to see if it can survive a 30 foot drop, just so she can be a youtube sensation. My apple ipad is now
broken and she has 83 views. I know this is entirely off topic but I had
to share it with someone!

Here is my page - roblox id

Heya i am for the first time here. I found this board and I find It
truly useful & it helped me out much. I hope to give something back and aid others like you aided me.

Take a look at my homepage :: www.deepakelectriccompany.com

Excellent beat ! I wish to apprentice while you amend your website, how could i subscribe
for a blog site? The account helped me a acceptable deal.

I had been a little bit acquainted of this your broadcast offered bright clear idea

Feel free to visit my site ... 인터넷 포커 게임

Having read this I thought it was really informative.
I appreciate you spending some time and effort to put this article together.
I once again find myself spending a lot of time both reading and posting comments.
But so what, it was still worthwhile!

Look into my blog ... 블랙 잭 게임

I have read a few just right stuff here. Certainly worth bookmarking for revisiting.
I surprise how a lot effort you put to make this type of excellent
informative site.

Also visit my blog post - www.founderwall.com

You should be a part of a contest for one of the most
useful blogs on the internet. I'm going to highly recommend this site!

Feel free to surf to my homepage - www.cyber-pvc.com

Excellent goods from you, man. I have understand your stuff previous to and you are just extremely
fantastic. I really like what you have acquired here, certainly like what you're
saying and the way in which you say it. You make it
enjoyable and you still care for to keep
it smart. I cant wait to read far more from you.
This is actually a terrific site.

Here is my blog :: 싱글 포커

I genuinely value your piece of work, Great post.

Also visit my web blog: 39.98.110.214

I'm truly enjoying the design and layout of your blog.
It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often.
Did you hire out a designer to create your theme?
Superb work!

Here is my site - 룰렛 게임

I’m not that much of a online reader to be honest but your blogs really nice, keep
it up! I'll go ahead and bookmark your site to come back in the future.
Cheers

Here is my webpage: 더존카지노 http://www.animated-gifs.eu/atsphp-5.2.1/index.php?a=stats&u=lana197572788

Quality articles is the main to attract the people to visit the
website, that's what this web site is providing.

Here is my web blog; 에비앙 카지노

Greetings! Very helpful advice within this post! It is the
little changes that make the largest changes. Many thanks for sharing!

Here is my web page ... boombox codes

If you want to increase your familiarity simply keep visiting this web
page and be updated with the most recent news
posted here.

My website - 로투스 홀짝 게임

I could not resist commenting. Very well written!

Also visit my web-site - 월드 카지노

hey there and thank you for your info – I have definitely picked up something new from right here.
I did however expertise some technical points using this web site, as I experienced to reload the website a lot of times previous to
I could get it to load properly. I had been wondering if your web host is OK?
Not that I am complaining, but slow loading instances times
will sometimes affect your placement in google and can damage your quality score if advertising and marketing with
Adwords. Anyway I am adding this RSS to my email and can look
out for a lot more of your respective intriguing content.
Ensure that you update this again soon.

Here is my webpage - 호 카지노

I'm gone to convey my little brother, that he should
also go to see this blog on regular basis to obtain updated from newest news update.

my page; 오리엔탈 카지노

Excellent post. I used to be checking constantly this weblog and I am impressed!
Extremely useful info specifically the final part :
) I care for such info a lot. I used to be seeking
this certain information for a very long time. Thank you and good luck.

my blog post ... 테크노 바카라

If you desire to take a great deal from this article then you have to apply these methods to your won web site.

Here is my website 33 카지노

It's difficult to find educated people for this subject, however, you sound like
you know what you're talking about! Thanks

Here is my website 바카라 스토리

I'm really enjoying the theme/design of your weblog.
Do you ever run into any web browser compatibility issues?
A number of my blog visitors have complained about my website not operating correctly in Explorer but looks great in Safari.
Do you have any suggestions to help fix this issue?

Have a look at my web blog :: Senaida

I think that everything said was actually very reasonable.
However, think on this, suppose you added a little information?
I mean, I don't want to tell you how to run your website, however what if you added a headline that grabbed a person's attention? I mean Új
hozzászólás | linux.valodi.info is a little plain. You
ought to glance at Yahoo's front page and watch how they create post headlines to
get viewers to click. You might add a video
or a pic or two to get readers excited about everything've written. In my opinion, it could
make your posts a little bit more interesting.

my webpage - lose weight

Quality articles or reviews is the secret to interest the visitors to go to
see the web page, that's what this website is providing.

My web blog - growing weed

Can you tell us more about this? I'd care to find out more details.

Feel free to visit my web-site - สมัครสล็อต

This piece of writing will assist the internet users for
setting up new blog or even a blog from start to end.

My webpage :: 온라인 다이 사이

It's awesome to go to see this web site and reading the views of all mates regarding this post, while I am also eager of getting experience.

Feel free to visit my web blog - 카 라벨 카지노

Greetings, There's no doubt that your blog could possibly
be having browser compatibility issues. When I take a look at your website in Safari,
it looks fine however, if opening in IE, it has some
overlapping issues. I simply wanted to provide you with
a quick heads up! Aside from that, fantastic website!

Also visit my blog - Shani

Oldalak

Új hozzászólás

Filtered HTML

  • A webcímek és email címek automatikusan kattintható hivatkozásokká alakulnak.
  • Engedélyezett HTML jelölők: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.

Plain text

  • A HTML jelölők használata nem megengedett.
  • A webcímek és email címek automatikusan kattintható hivatkozásokká alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
Ezt a mezöt ember.fia nem.tölti ki.
CAPTCHA
Ez a művelet azért szükséges, mert nem szeretnék kéretlen bejegyzéseket az oldalra.
Kép CAPTCHA
Írd be a képen látható karaktereket. Köszönöm.