UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3180 - October 21, 2009
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CTRL-D ANOTHER USE
Many Unix Admins use the C shell as their interactive shell. An often used feature of Csh is file completion - initiated with 'set filec'. It allows the Csh user to type in partial file names, and then press escape to get them completed where possible. A little known side effect of this is that Control-D (^D) will now generate file listings in the middle of command lines.
Example 1: (where @ is a space)
host > @^D
Lists the current directory
Example 2:
host >ln -s /usr/^D
Lists the /usr directory
host >tar cvf /dev/nrtape /usr/m^D
Lists all m* files in the /usr directory
In each case, after the listing, you get a new command line and are placed at the last point of edit.
Very handy if you you know what you wanted to do but forgot what you wanted to do it with!
This tip generously supported by: mikal.dunn@halliburton.com
--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.
Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================
Tidak ada komentar:
Posting Komentar