name

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 16 May 2013
Index Return to Main Contents

 

NAME

name - print description of a file or directory examined from the file header

 

SYNOPSIS

edrc/bin/name [ selection ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

Print a description of a selection of files or directories in the current working directory examined from the file header.

This helps to get a quick overview of the purpose of files and directories located in a certain directory.

The file header must have the (very simple to remember) format:

filename - the description text
or:
path/filename - the description text

Between the filename, the - and the description text has to be only one space each.

The filename has to be identical to the real filename. See also scriptheadersync(1) to see how to efficiently synchronize file headers with the real file name.

If you do hard- or symbolic links to a file, each name of the file has to have an own description line in the header.

If the original file does not have a header entry of the symlinked file, the header entry of the original file is displayed.

If the file has been saved using the sav(3) command or if it is a backuped recovery script file as found in the .sav directories of a recovery script tree handled by edrc(1m), the name command can also display the header information.

If all the methods above do not succeed or if it is a directory, the index file ..name_index is consulted for the file header information.

Binary files are not scanned for file header patterns.

 

OPTIONS

selection
selection as known from the ls command to select a subset of files or directories from the current working directory.

 

ENVIRONMENT

-

 

EXIT STATUS

0
no error.

2
operating system is not supported, yet. See osid(3) if you get this error.

4
usage printed.

 

FILES

..name_index
list of file or directory header descriptions for a certain directory. If this file exists and the file header cannot be resolved from the file itself the name command will return the matching description from that file. This might be the cause, if the file does not allow comment entries, or the file is based on a 3rd party source and it is not wished to change the file. The format is identical to the file header.

etc/name.index
global list of file header descriptions. This file is read if neither the name can be resolved from the file itself, nor from the ..name_index file.

 

EXAMPLES

1) Shellscript header

#!/bin/sh
#
# busy - keep the line open
#
# [00] 28.02.2001 CWa   Initial Version
#

2) Configuration file header

#
# /etc/hosts - internet host names
#
# [00] 28.02.2001 CWa   Initial Version
#
#

127.0.0.1 localhost
192.168.75.1 rh7mzv7t001

3) Configuration file header

;
; /etc/samba/smb.conf - samba configuration file
;
; [00] 28.02.2001 CWa   Initial Version
;
;
[global]
    workgroup = MYGROUP
    server string = %h

4) SQL script header

--
-- TopTen.sql - Reports lists DB statistics
--
-- [00] 31.1.2003 CBi   Initial
--
select
    a.tablespace_name,
    a.bytes/1024 as total_kbytes,

5) Manpage file header

.\"
.\" name.1 - manpage for name 
.\"
.\" [00] 30.11.2003 CWa Initial Version
.\"

 

SEE ALSO

edrcintro(1), edrcrevision(1), revision(1), scriptheadersync(1), file(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

name was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net . 

 

COPYRIGHT

Copyright © 2013 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:53:47 GMT, August 28, 2024