Unix5 - My only new file was world.temp a find...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem 1 Sorting is useful to go through files and order the information that are in certain columns. a) Sort by city name sort +0 world.temp b) Sort by high temperatures (low to high) sort +1 world.temp Sort by high temperatures (high to low) sort +1 –r world.temp c) Sort by city name as primary and low temperatures as secondary (low temps from low to high) sort +2 world.temp Sort with low temp from high to low sort +2 –r world.temp Problem 2 For find anything new than the passwd file the “newer” argument is used All items that were newer where the ones that were created since logging into this session.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: My only new file was world.temp a) find ~ -newer /etc/passwd To find all .ps and .gif files Match anything that ended in .ps or .gif and delete those after prompting the user to delete those. b) find ~ \( -name \*.ps –o –name \*.gif \) –exec rm –I {} \; Finding is useful to search for a certain type of file or a file name or a file that contains a certain string or value. Finding also things that are new than a particular object is useful to see what modifications have been made recently....
View Full Document

This document was uploaded on 03/07/2011.

Ask a homework question - tutors are online