more
sometimes, while viewing huge files it would be necessary to view it such that the
contents of the page are displayed as the user examines them and wishes to go
to the next one. user can use various keys in order to go front or back of a page. Move
to few lines ahead or behind.
Example 1)
suppose you have a large file with name greenlife.txt. It contains a total of 1000 lines.
Then to open it and view it page wise enter
/home/g321$ more greenlife.txt
sustainable living
Sustainable living is a lifestyle that attempts to reduce an individual's or soceity’s
attempt to reduce their carbon footprint by altering methods of transportation, energy
sustainability, in natural balance and respectful of humanity's symbiotic relaivelyt
ly interrelated with the overall principles of sustainable development.
Lester R. Brown, a prominent environmentalist and founder of the Worldwatch Inst used
reuse/recycle economy with a diversified transport system."
Contents
1 Definition
2 History
3 Shelter
3.1 List of some sustainable materials
4 Power
4.1 List of organic matter than can be burned for fuel
5 Food
5.1 Environmental impacts of industrial agriculture
5.2 Conventional food distribution and long distance transport
5.3 Local and seasonal foods
5.4 Reducing meat consumption
5.5 Organic farming
5.6 Urban gardening
5.7 Food preservation and storage
6 Transportation
7 Water
7.1 Indoor home appliances
7.1.1 Toilets
7.1.2 Showers
7.1.3 Dishwasher/Sinks
7.1.4 Washing machines
7.2 Outdoor water usage
7.2.1 Conserving Water
7.2.2 Sequestering Water
8 Waste
Sustainable living is fundamentally the application of sustainability to lifestyle

Here it waits for user input to go to the next page. The user now has the choice of doing the following few things.(many more options available)
- to display the next line ,type return or “Enter” key. type f to go
front 1 line and b to go back one line.
- to display the entire next page type space key.
- To go 100 lines ahead type 100f and press enter
- To go 10 lines behind type 10b
- To go to the end of page press shift + g
- To exit press q
- To search a pattern, type /and enter the keyword.
Example 2)
While searching for patterns using more , if you want to ignore cases use –i option.
/home/g321$ more greenlife.txt
...
....
...... lines
/outdoor
|
|
------ >This will search for all the occurrences of the pattern ‘outdoor’ in the file, ignoring case and highlights them.
Example 3)
You can cause more command to display the specified number of lines in the window by using –n number option.
For example to view 15 lines per window ,
/home/g321$more -15 greenlife.txt
No comments:
Post a Comment