Monday, October 26, 2009

Text Editing / Viewing Files in Linux (quick examples)

$ nano myfilename
____basic navigation commands are displayed (page up + down), no need to remember!
$ cat myfilename
____prints contents out, no editor
$ less myfilename
____view file text, no editing
____G : end of file,
____ctrl-v : page down, (works in man listings)
____ctrl-b : page up, (works in man listings)
____/text : forward search
____?text : backward search:
____F : go to end, display new data, (good for watching logs)
$ tail -n 200 development.log
____prints last 200 lines, -f keeps the file open and prints more as the file grows

No comments: