English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Thanks all

2007-04-17 06:04:02 · 3 answers · asked by vicente. t 2 in Computers & Internet Programming & Design

3 answers

list files with detail, sort by modification time, recurse subdirectories containing the letters "tmp" and store those filenames in a file called z.z

2007-04-17 06:13:07 · answer #1 · answered by Vegan 7 · 0 0

Do a directory listing, long or detailed (-l) in reverse order (-r) by modification time (-t) ; pipe (|) the results through grep to find only those that contain "tmp" and redirect the output (>) to file z.z

2007-04-17 13:15:14 · answer #2 · answered by tj 6 · 0 0

'ls' lists files in the current directory. the '| grep xxxxx' part means it will "grep" (search, essentially) for things in the list that match your search term and only list those.

the '-lrt' part are flags for the 'ls' command.

type "man ls" into your unix terminal for more specifics.

EDIT: breakdown of the '-lrt' flags: 'l' outputs the list in a long format (more info per result), 'r' reverses the list output (z-a instead of a-z), and 't' sorts by last modified—which, of course, is reversed by the 'r' flag. so '-lrt' returns a list of the files in reverse chronological order.

2007-04-17 13:12:09 · answer #3 · answered by Darwin 1 · 0 0

fedest.com, questions and answers