<HTML
><HEAD
><TITLE
>Files and filenames</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.54"><LINK
REL="HOME"
TITLE="GNOME User's Guide"
HREF="index.html"><LINK
REL="UP"
TITLE=" If you are new to Linux/UNIX"
HREF="newbies.html"><LINK
REL="PREVIOUS"
TITLE=" If you are new to Linux/UNIX"
HREF="newbies.html"><LINK
REL="NEXT"
TITLE="Directories and paths"
HREF="new-dirs.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GNOME User's Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="newbies.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix A. If you are new to Linux/UNIX</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="new-dirs.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="NEW-FILE"
>Files and filenames</A
></H1
><P
>      Under most operating systems (including UNIX), there is the
      concept of a <I
CLASS="EMPHASIS"
>file</I
>, which is just a bundle of
      information given a name (called a
      <I
CLASS="EMPHASIS"
>filename</I
>). Examples of files might be
      your history term paper, an e-mail message, or an actual
      program that can be executed. Essentially, anything saved on
      disk is saved in an individual file.
    </P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="NEW-FILENAMES"
>Filenames</A
></H2
><P
>	Files are identified by their filenames. For example, the file
	containing your conference talk might be saved with the filename
	<TT
CLASS="FILENAME"
>talk.txt</TT
>. There is no standard format for file
	names as there is under MS-DOS and some other operating systems; in
	general, a filename can contain any character (except the /
	character&#8211;see the discussion of path names below) and is
	limited to 256 characters in length.
      </P
><DIV
CLASS="IMPORTANT"
><P
></P
><TABLE
CLASS="IMPORTANT"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>IMPORTANT</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>	  Unlike MS-DOS, the filenames in UNIX are case-sensitive:
	  <TT
CLASS="FILENAME"
>myfile.txt</TT
> and <TT
CLASS="FILENAME"
>MyFile.txt</TT
> are
	  considered as two different files.
	</P
></TD
></TR
></TABLE
></DIV
><P
>	You should also be aware of several UNIX conventions; while they are
	not mandatory, it is usually a good idea to follow them.
	<P
></P
><UL
><LI
><P
> It is customary to use the format
	      <TT
CLASS="FILENAME"
>filename.extension</TT
> for filenames, where the
	      extension indicates the file type; for example, the
	      extension <TT
CLASS="FILENAME"
>txt</TT
> is usually used for plain
	      text files, while the extension <TT
CLASS="FILENAME"
>jpeg</TT
> is
	      used for graphics in JPEG format, and so on. In
	      particular, the <TT
CLASS="APPLICATION"
>GNOME File
		Manager</TT
> (<TT
CLASS="APPLICATION"
>GMC</TT
>)
	      uses extensions to determine file type. You can view all
	      the file extensions recognized by
	      <TT
CLASS="APPLICATION"
>GMC</TT
> by choosing the
	      <B
CLASS="GUIMENUITEM"
>Edit mime types</B
> command in the
	      <B
CLASS="GUIMENU"
>Commands</B
> menu of
	      <TT
CLASS="APPLICATION"
>GMC</TT
>. Note that the standard
	      convention in UNIX is that the
	      <I
CLASS="EMPHASIS"
>executables</I
> (i.e., the program
	      files) have no extension at all.
            </P
></LI
><LI
><P
> Files and directories whose names begin with a dot
	      (.) are usually <I
CLASS="EMPHASIS"
>configuration
		files</I
>, that is, files which keep settings and
	      preferences for various applications. For example, GNOME
	      keeps all its settings in various files in the directories
	      <TT
CLASS="FILENAME"
>.gnome</TT
> and
	      <TT
CLASS="FILENAME"
>.gnome-desktop</TT
> in the user's home
	      directory. Since most of the time you do not need to
	      edit these files manually, or even know their precise
	      names and locations, <TT
CLASS="APPLICATION"
>GMC</TT
>
	      usually doesn't show these files. You can change this
	      setting using the <B
CLASS="GUIMENUITEM"
>Preferences</B
> dialog
	      (see <A
HREF="gmcprefs.html"
>the section called <I
>Changing Your Preferences in the File Manager</I
> in the chapter called <I
>The GNOME File Manager</I
></A
>).
	    </P
></LI
><LI
><P
> Files with names ending with tilde (~) are
	      usually backup files created by various
	      applications. For example, when you edit a file
	      <TT
CLASS="FILENAME"
> myfile.txt</TT
> with <TT
CLASS="APPLICATION"
>emacs</TT
>, it
	      saves the previous version in the file
	      <TT
CLASS="FILENAME"
>myfile.txt~</TT
>. Again, you can control whether
	      you want GNOME File Manager to show these files or not
	      in <B
CLASS="GUIMENUITEM"
>Preferences</B
> dialog (see <A
HREF="gmcprefs.html"
>the section called <I
>Changing Your Preferences in the File Manager</I
> in the chapter called <I
>The GNOME File Manager</I
></A
>).
	    </P
></LI
></UL
>
      </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="NEW-WILDCARDS"
>Wildcards</A
></H2
><P
>When entering commands from the command line, you can use
	so-called <I
CLASS="EMPHASIS"
>wildcards</I
> instead of an exact
	filename. The most common wildcard is *, which matches any
	sequence of symbols (including an empty string). For example,
	the command <B
CLASS="COMMAND"
>ls *.txt</B
> will list all the files with
	the extension <TT
CLASS="FILENAME"
>txt</TT
>, and the command <B
CLASS="COMMAND"
>rm
	  chapter*</B
> will remove all files with the names starting with
	<TT
CLASS="FILENAME"
>chapter</TT
> (<B
CLASS="COMMAND"
>ls</B
> and <B
CLASS="COMMAND"
>rm</B
> are UNIX
	commands for listing and removing files). Another useful
	wildcard is ?, which matches any single symbol: for example,
	<B
CLASS="COMMAND"
>rm chapter?.txt</B
> will remove files
	<TT
CLASS="FILENAME"
>chapter1.txt, chapter2.txt</TT
> , but not
	<TT
CLASS="FILENAME"
>chapter10.txt</TT
>
      </P
><P
>Most new GNOME users prefer using the <TT
CLASS="APPLICATION"
>GNOME
	  File Manager</TT
> for operations with files, rather
	  than working from the command line. Wildcards can also be
	  used from <TT
CLASS="APPLICATION"
>GMC</TT
> in the file
	  selection and view filter dialogs.  </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="newbies.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="new-dirs.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>If you are new to Linux/UNIX</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="newbies.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Directories and paths</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>