Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 3e60ff9d4d6f58c8fbd17208f14089fa > files > 133

octave-doc-3.2.3-3mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Current Working Directory - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="System-Utilities.html#System-Utilities" title="System Utilities">
<link rel="prev" href="Environment-Variables.html#Environment-Variables" title="Environment Variables">
<link rel="next" href="Password-Database-Functions.html#Password-Database-Functions" title="Password Database Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Current-Working-Directory"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Password-Database-Functions.html#Password-Database-Functions">Password Database Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Environment-Variables.html#Environment-Variables">Environment Variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="System-Utilities.html#System-Utilities">System Utilities</a>
<hr>
</div>

<h3 class="section">34.8 Current Working Directory</h3>

<!-- dirfns.cc -->
<p><a name="doc_002dcd"></a>

<div class="defun">
&mdash; Command: <b>cd</b><var> dir<a name="index-cd-2425"></a></var><br>
&mdash; Command: <b>chdir</b><var> dir<a name="index-chdir-2426"></a></var><br>
<blockquote><p>Change the current working directory to <var>dir</var>.  If <var>dir</var> is
omitted, the current directory is changed to the user's home
directory.  For example,

     <pre class="example">          cd ~/octave
</pre>
        <p class="noindent">Changes the current working directory to <samp><span class="file">~/octave</span></samp>.  If the
directory does not exist, an error message is printed and the working
directory is not changed. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dmkdir.html#doc_002dmkdir">mkdir</a>, <a href="doc_002drmdir.html#doc_002drmdir">rmdir</a>, <a href="doc_002ddir.html#doc_002ddir">dir</a>. 
</p></blockquote></div>

<!-- ./miscellaneous/ls.m -->
   <p><a name="doc_002dls"></a>

<div class="defun">
&mdash; Command: <b>ls</b><var> options<a name="index-ls-2427"></a></var><br>
<blockquote><p>List directory contents.  For example,

     <pre class="example">          ls -l
               -| total 12
               -| -rw-r--r--   1 jwe  users  4488 Aug 19 04:02 foo.m
               -| -rw-r--r--   1 jwe  users  1315 Aug 17 23:14 bar.m
</pre>
        <p>The <code>dir</code> and <code>ls</code> commands are implemented by calling your
system's directory listing command, so the available options may vary
from system to system. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002ddir.html#doc_002ddir">dir</a>, <a href="doc_002dstat.html#doc_002dstat">stat</a>, <a href="doc_002dreaddir.html#doc_002dreaddir">readdir</a>, <a href="doc_002dglob.html#doc_002dglob">glob</a>, <a href="doc_002dfilesep.html#doc_002dfilesep">filesep</a>, <a href="doc_002dls_005fcommand.html#doc_002dls_005fcommand">ls_command</a>. 
</p></blockquote></div>

<!-- ./miscellaneous/ls_command.m -->
   <p><a name="doc_002dls_005fcommand"></a>

<div class="defun">
&mdash; Function File: [<var>old_cmd</var> = <b>ls_command</b> (<var>cmd</var>)<var><a name="index-ls_005fcommand-2428"></a></var><br>
<blockquote><p>Set or return the shell command used by Octave's <code>ls</code> command. 
The value of <var>cmd</var> must be a character string. 
With no arguments, simply return the previous value. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dls.html#doc_002dls">ls</a>. 
</p></blockquote></div>

<!-- ./miscellaneous/dir.m -->
   <p><a name="doc_002ddir"></a>

<div class="defun">
&mdash; Function File:  <b>dir</b> (<var>directory</var>)<var><a name="index-dir-2429"></a></var><br>
&mdash; Function File: [<var>list</var>] = <b>dir</b> (<var>directory</var>)<var><a name="index-dir-2430"></a></var><br>
<blockquote><p>Display file listing for directory <var>directory</var>.  If a return
value is requested, return a structure array with the fields

     <pre class="example">          name
          bytes
          date
          isdir
          statinfo
</pre>
        <p class="noindent">in which <code>statinfo</code> is the structure returned from <code>stat</code>.

        <p>If <var>directory</var> is not a directory, return information about the
named <var>filename</var>.  <var>directory</var> may be a list of directories
specified either by name or with wildcard characters (like * and ?) 
which will be expanded with glob.

        <p>Note that for symbolic links, <code>dir</code> returns information about
the file that a symbolic link points to instead of the link itself. 
However, if the link points to a nonexistent file, <code>dir</code> returns
information about the link. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dls.html#doc_002dls">ls</a>, <a href="doc_002dstat.html#doc_002dstat">stat</a>, <a href="doc_002dlstat.html#doc_002dlstat">lstat</a>, <a href="doc_002dreaddir.html#doc_002dreaddir">readdir</a>, <a href="doc_002dglob.html#doc_002dglob">glob</a>, <a href="doc_002dfilesep.html#doc_002dfilesep">filesep</a>. 
</p></blockquote></div>

<!-- dirfns.cc -->
   <p><a name="doc_002dpwd"></a>

<div class="defun">
&mdash; Built-in Function:  <b>pwd</b> ()<var><a name="index-pwd-2431"></a></var><br>
<blockquote><p>Return the current working directory. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002ddir.html#doc_002ddir">dir</a>, <a href="doc_002dls.html#doc_002dls">ls</a>. 
</p></blockquote></div>

   </body></html>