Viewing Files and Directories
The SRC software stores information in files on the system, including configuration files, log files, and system software files. You can use operational commands to view files and directories on the system. Topics include:
Directories on the C Series Controller
The C Series Controller has numerous directories used by the operating system. Table 10 lists directories on a C Series Controller.
Table 10: Directories on a C Series Controller
Directory | Description |
---|---|
/altroot | Files that are a snapshot of the file system. You can use these files to restore the file system to the state in the snapshot. |
/altvar | Files that are a snapshot of the file system. You can use these files to restore the file system to the state in the snapshot. |
/media | Mount points created automatically for dynamic devices (for example, USB flash drive) |
/opt/UMC | Files for installed components |
/tmp | Temporary files |
/var/home | Home directory for local users |
/var/log | System log files |
/var/UMC | Operational files and log files |
Listing Files and Directories
You can view the system’s directory structure as well as individual files by issuing the file commands in operational mode.
The user’s home directory is the default directory for most of the SRC software commands that require a filename.
You can change the default directory by using the set cli directory command.
To view a list of the file commands, type the following:
user@host> file ? Possible completions: archiveArchive files from the system (local) checksumCalculate file checksum compareCompare files (local) copyCopy files deleteDelete a file (local) listList files (local) renameRename a file (local) showShow file contents user@host> file
Use the list option to see the directory structure. For example, to show the files located in your home directory:
user@host> file list initial.cfg install.log install.log.syslog
To view the contents of other file directories, specify the directory location. For example:
user@host> file list /opt/UMC/ acp agent cli editor idp jdb jre licsvr net-snmp nic pom redir sae smg webadm
You can also use the CLI context-sensitive help system to locate a directory. For example:
user@host> file list / ? Possible completions: <path>Path to list /.autofsckSize: 0, Last changed: Sep 19, 2006 1:36 PM /altroot/Last changed: Sep 19, 2006 1:22 PM /bin/Last changed: Sep 19, 2006 1:27 PM /boot/Last changed: Sep 19, 2006 1:25 PM /dev/Last changed: Sep 19, 2006 1:36 PM /etc/Last changed: Sep 19, 2006 2:42 PM /home/Last changed: Feb 18, 2005 4:26 AM /initrd/Last changed: Feb 18, 2005 4:26 AM /lib/Last changed: Sep 19, 2006 1:26 PM /lib64/Last changed: Sep 19, 2006 1:26 PM /lost+found/Last changed: Sep 19, 2006 1:22 PM /media/Last changed: Sep 19, 2006 1:36 PM /misc/Last changed: Aug 15, 2006 8:33 PM /mnt/Last changed: Feb 18, 2005 4:26 AM /net/Last changed: Sep 19, 2006 1:36 PM /opt/Last changed: Sep 19, 2006 1:27 PM /proc/Last changed: Sep 19, 2006 1:36 PM /root/Last changed: Sep 19, 2006 6:44 PM /sbin/Last changed: Sep 19, 2006 1:26 PM /selinux/Last changed: Sep 19, 2006 1:36 PM /srv/Last changed: Feb 18, 2005 4:26 AM /sys/Last changed: Sep 19, 2006 1:36 PM /tmp/Last changed: Sep 19, 2006 6:46 PM /usr/Last changed: Sep 19, 2006 1:24 PM /var/Last changed: Sep 19, 2006 1:36 PM
user@host> file list /var/? Possible completions: <path>Path to list /var/UMC/Last changed: Sep 19, 2006 1:28 PM /var/account/Last changed: Sep 19, 2006 1:25 PM /var/acp/Last changed: Sep 19, 2006 1:27 PM /var/cache/Last changed: Sep 19, 2006 1:26 PM /var/crash/Last changed: Sep 19, 2006 1:25 PM /var/db/Last changed: Sep 19, 2006 1:26 PM /var/empty/Last changed: Sep 19, 2006 1:26 PM /var/home/Last changed: Sep 19, 2006 6:44 PM /var/lib/Last changed: Sep 19, 2006 1:36 PM /var/local/Last changed: Feb 18, 2005 4:26 AM /var/lock/Last changed: Sep 19, 2006 1:36 PM /var/log/Last changed: Sep 19, 2006 2:41 PM /var/lost+found/Last changed: Sep 19, 2006 1:22 PM /var/mail/Last changed: Feb 18, 2005 4:26 AM /var/net-snmp/Last changed: Sep 19, 2006 6:44 PM /var/nis/Last changed: Feb 18, 2005 4:26 AM /var/opt/Last changed: Feb 18, 2005 4:26 AM /var/preserve/Last changed: Feb 18, 2005 4:26 AM /var/run/Last changed: Sep 19, 2006 6:44 PM /var/spool/Last changed: Sep 19, 2006 1:26 PM /var/tmp/Last changed: Sep 19, 2006 1:28 PM /var/yp/Last changed: Sep 19, 2006 1:26 PM
You can also display the contents of a file. For example:
user@host> file show install.log Installing 309 packages
Installing chkconfig-1.3.13.4-1.x86_64. Installing ethtool-1.8-4.x86_64. Installing hdparm-5.7-2.x86_64. Installing hwdata-0.146.22.EL-1.noarch. Installing iputils-20020927-18.EL4.3.x86_64. Installing libgcc-3.4.6-3.i386. Installing libgcc-3.4.6-3.x86_64. Installing mingetty-1.07-3.x86_64. Installing mktemp-1.5-20.x86_64. Installing redhat-logos-1.1.26-1.junosx.noarch. Installing rootfiles-8-1.noarch. Installing setserial-2.17-17.x86_64. . . .
Specifying Filenames and URLs
In some CLI commands and configuration statements—including file copy, file, archive, load, and save—you can include a filename.
You can specify a filename or URL in one of the following ways:
filename—File in the user’s current directory on the local system. You can use wildcards to specify multiple source files or a single destination file. Wildcards are not supported in 7.0.0 Hypertext Transfer Protocol (HTTP) or FTP.
Note Wildcards are supported only by the file compare, file copy, file delete, file list, file rename, file show, and save commands. When you issue the file show command with a wildcard, it must resolve to one filename.
path/filename—File on the local system.
File URL—File URL of local files.
usb:filename—Files on a dynamically mounted USB port.
Note This format supports only a single partition on a USB storage device. If the system device of the USB storage device contains more than one partition, the SRC software sorts the partitions according to file system type and uses the first partition.
ftp://hostname/path/filename—File on an FTP server. You can also specify hostname as username@hostname or username:password@hostname.
For example:
user@host> file copy ftp://username@ftp.hostname.net//filename
file copy ftp.hostname.net: Not logged in.