Table of Contents
This chapter describes how to use TASCMD, a command line tool, to query and manage files stored in a disk space.
TASCMD commands can be used to query disk spaces and query and manage files stored in a disk space. It can also be used to save a file from a local directory to a disk space and vice versa.
When a TASCMD command is executed, TASCMD accesses the TAS instance and requests necessary data or jobs.
When executing TASCMD, specify connection information for the target TAS instance as follows:
[Example 6.1] TASCMD Execution Parameters
tbascmd {port} $ tbascmd 52000 ASCMD 6 TmaxData Corporation Copyright (c) 2008-. All rights reserved. ASCMD>
TASCMD connects to the local TAS instance through an entered port number. The port number must be entered, and the TAS instance must booted before executing TAS and its command.
The following describes each TASCMD command.
Command | Description |
---|---|
cd | Changes the current path. |
du | Displays the total disk space occupied by the files and directories in the specified path, or the total capacity of the diskspaces. |
exit | Terminates TASCMD. |
help | Displays help about TASCMD commands. |
ls | Displays the list of files and directories in the specified path, or disk spaces. |
lsds | Displays the detailed list of disk spaces. |
pwd | Displays the current path. |
rm | Removes TAS files. |
cp | Creates a new TAS file by copying a TAS file. |
cpfromlocal | Creates a new TAS file by copying a local file. |
cptolocal | Creates a local file by copying a TAS file. |
A file name or path option can be specified as absolute or relative path.
Starts with the '+' symbol followed by the disk space name and path in the disk space.
[Example 6.2] Absolute Path Example
current path = +DS0 ASCMD> cd +DS0/d1/sample current path = +DS0/d1/sample
Path relative to the current path. It is combined with the current path for use in a command.
[Example 6.3] Relative Path Example
current path = +DS0 ASCMD> cd d1/sample current path = +DS0/d1/sample
The following symbols can be used in a relative path.
Symbol | Description |
---|---|
"." | Current path. |
".." | Parent path. If the last '/' in a path or the current path is a disk space, this indicates the top-level path ('+'). |
Additional path can be appended after a "." or "..".
[Example 6.4] Relative Path Symbol Example
current path = +DS0/d1 ASCMD> cd ./sample current path = +DS0/d1/sample ASCMD> cd ../example current path = +DS0/d1/example
Changes the current path.
Usage
cd {path}
Option | Description |
---|---|
path | Path to which the current path is changed, if it exists. |
Displays the total disk space occupied by the files and directories in the specified path, or the total capacity of the diskspaces. If the top-level path (+) is specified, the total and free sizes of disk spaces are displayed.
Usage
ls [-a] [path]
Option | Description |
---|---|
-a | Displays the disk space occupied by all files of the subdirectories in the specified path. |
path | Path (optional). If not specified, the current path is used. |
Example
The following example displays the size of files and their size adjusted for mirroring.
current path = +DS0/d0 ASCMD> du File_name Used_mb Mirror used mb f5.txt 12 24 f6.txt 2 4 f8.txt 9 18 Total mb 23 46
The following example displays the total and free sizes of disk spaces.
current path = + ASCMD> du diskspace name Total_mb Free_mb DS0 3069 286 diskspace name Total_mb Free_mb DS1 3069 2782 diskspace name Total_mb Free_mb DS2 3069 2720
Displays help about TASCMD commands. If a command is not specified, help is displayed for all commands.
ASCMD> help
Displays the list of files and directories in the specified path, or disk spaces. If the top-level path (+) is specified, a disk space list is displayed.
Usage
ls [-a] [path]
Option | Description |
---|---|
-a | Displays the list of all files of the subdirectories in the specified path. |
path | Path (optional). If not specified, the current path is used. |
Example
The following example displays a list of files.
current path = +DS0/d0 ASCMD> ls File_name f5.txt f6.txt f8.txt
The following example displays a list of disk spaces.
current path = + ASCMD> ls DS0 DS1 DS2
Displays the detailed list of disk spaces. The information includes the disk space number, name, and status, redundancy level, sector size, meta block size, size allocated on disk, total size, and free size.
Usage
lsds
Example
ASCMD> lsds =============================================================== Diskspace no. Diskspace name 0 DS0 Status Redun_type MOUNT NORMAL Sector_size Meta_blksize au_size 512 8192 1048576 Total_mb Free_mb 3069 286 =============================================================== Diskspace no. Diskspace name 1 DS1 Status Redun_type MOUNT NORMAL Sector_size Meta_blksize au_size 512 8192 1048576 Total_mb Free_mb 3069 2782 =============================================================== ...
Removes TAS files.
Usage
rm {files}
Option | Description |
---|---|
files | Path and name of file(s) to remove. One or more files can be specified. |
Example
current path = +DS0/d0 ASCMD> ls File_name f5.txt f6.txt f8.txt ASCMD> rm f5.txt rm complete: +DS0/d0/f5.txt ASCMD> ls File_name f6.txt f8.txt
cp creates a new TAS file by copying an existing TAS file, pfromlocal creates a new TAS file by copying a local file, and cptolocal creates a local file by copying an existing TAS file. Each command also displays the copied file size, time taken to copy the file, and speed. If the specified new file name already exists, an error message is displayed without copying the file.
Usage
cp {infile} {outfile} cpfromlocal {infile} {outfile} cptolocal {infile} {outfile}
Option | Description |
---|---|
infile | Source file name. |
outfile | New file name. |
Example
current path = +DS0/d0 ASCMD> du File_name Used_mb Mirror used mb f6.txt 2 4 f8.txt 9 18 Total mb 11 22 ASCMD> cp f6.txt f5.txt 2097152 bytes (2.00 MB) copied, 0.079874 s, 26.255753 MB/s ASCMD> du File_name Used_mb Mirror used mb f5.txt 2 4 f6.txt 2 4 f8.txt 9 18 Total mb 13 26