File System Commands#

fs_cat#

Description#

Print file contents to the terminal output. File contents, in the ASCII character set.

Non-printable/non-space characters are transmitted as full stops (“periods”, character code 46).

For a more convenient display of binary files use fs_od.

Requirements#

File System Core

Synopsis#

fs_cat [file]

Arguments#

Argument

Detail

Example

file

Path of file to print to terminal output.

fs_cat hello.txt

-h

Displays a description of the command.

fs_cat -h

Notes / Warnings#

None.

fs_cd#

Description#

Change the working directory.

Requirements#

File System Core

Synopsis#

fs_cd [dir]

Arguments#

Argument

Detail

Example

dir

Absolute directory path or path relative to current working directory.

fs_cd root_dir

-h

Displays a description of the command.

fs_cd -h

Notes / Warnings#

The new working directory is formed in three steps:

  1. If the argument dir begins with the path separator character (slash, ‘\’) or a volume name, it will be interpreted as an absolute directory path and will become the preliminary working directory. Otherwise the preliminary working directory path is formed by the concatenation of the current working directory, a path separator character and dir.

  2. The preliminary working directory path is then refined, from the first to last path component:

    1. If the component is a ‘dot’ component, it is removed

    2. If the component is a ‘dot dot’ component, and the preliminary working directory path is not NULL, the previous path component is removed. In any case, the ‘dot dot’ component is removed.

    3. Trailing path separator characters are removed, and multiple path separator characters are replaced by a single path separator character.

The volume is examined to determine whether the preliminary working directory exists. If it does, it becomes the new working directory. Otherwise, an error is output, and the working directory is unchanged.

fs_cp#

Description#

Copy a file.

Requirements#

File System Core

Synopsis#

fs_cp [source_file] [dest_file]

Arguments#

Argument

Detail

Example

source_file

Source file path.

dest_file

Destination file path.

fs_cp source_file.txt dest_file.txt

-h

Displays a description of the command.

fs_cp -h

Notes / Warnings#

  1. In the first form of this command, neither argument may be an existing directory. The contents of source_file will be copied to a file named dest_file located in the same directory as source_file.

  2. In the second form of this command, the first argument must not be an existing directory and the second argument must be an existing directory. The contents of source_file will be copied to a file with name formed by concatenating dest_dir, a path separator character and the final component of source_file.

fs_date#

Description#

Write the date and time to terminal output, or set the system date and time.

Requirements#

file System Core

Synopsis#

fs_date

fs_date [time]

Arguments#

time

If specified, time to set, in the form mmddhhmmccyy:

field

range

1st mm

the month (1-12)

dd

the day (1-29, 30 or 31)

hh

the hour (0-23)

2nd mm

the minute (0-59)

ccyy

the year (1900 or larger)

Example: fs_date 092123591989

-h

Displays a description of the command.

Example: fs_date -h

Notes / Warnings#

None.

Figure - fs_date output Figure - fs_date output

fs_df#

Description#

Report disk free space.

Requirements#

File System Core

Synopsis#

fs_df

fs_df [vol]

Arguments#

Argument

Detail

Example

vol

If specified, volume on which to report free space. Otherwise, information about all volumes will be output.

fs_df volume1

-h

Displays a description of the command.

fs_df -h

Notes / Warnings#

None.

Figure - fs_df output Figure - fs_df output

fs_ls#

Description#

List directory contents.

Requirements#

File System Core

Synopsis#

fs_ls

Arguments#

None.

Notes / Warnings#

The output resembles the output from the standard UNIX command ls -l. See the figure below.

Figure - fs_ls output Figure - fs_ls output

fs_lsblk#

Description#

List all open block devices and display information about each partition composing the block device.

Requirements#

File System Core

Synopsis#

fs_lsblk

Arguments#

None.

Notes / Warnings#

The output resembles the output from the standard UNIX command lsblk -l. See the figure below.

Figure - fs_ls output Figure - fs_ls output

fs_mkdir#

Description#

Make a directory.

Requirements#

File System Core

Synopsis#

fs_mkdir [dir]

Arguments#

Argument

Detail

Example

dir

Directory path.

fs_mkdir source_dir

-h

Displays a description of the command.

fs_mkdir -h

Notes / Warnings#

None.

fs_mkfs#

Description#

Format a volume.

Requirements#

File System Core

Usages#

fs_mkfs [vol]

Arguments#

Argument

Detail

Example

vol

Volume name.

fs_mkfs volume1

-h

Displays a description of the command.

fs_mkfs -h

Notes / Warnings#

None.

fs_mount#

Description#

Mount volume.

Requirements#

File System Core

Usages#

fs_mount [dev] [part] [vol]

Arguments#

Argument

Detail

Example

dev

Device to mount.

part

Partition number

vol

Name which will be given to volume.

fs_mount sd0 1 volume1

-h

Displays a description of the command.

fs_mount -h

Notes / Warnings#

None.

fs_mv#

Description#

Move files.

Requirements#

File System Core

Synopsis#

fs_mv [source_entry] [dest_entry]

Arguments#

Argument

Detail

Example

source_entry

Source entry path.

dest_entry

Destination entry path.

fs_mv src.txt dest.txt, fs_mv src_dir dest_dir

-h

Displays a description of the command.

fs_mv -h

Notes / Warnings#

  1. In the first form of this command, the second argument must not be an existing directory. The file source_entry will be renamed dest_entry.

  2. In the second form of this command, the second argument must be an existing directory. source_entry will be renamed to an entry with name formed by concatenating dest_dir, a path separator character and the final component of source_entry.

In both forms, if source_entry is a directory, the entire directory tree rooted at source_entry will be copied and then deleted. Additionally, both source_entry and dest_entry or dest_dir must specify locations on the same volume.

fs_od#

Description#

Dump file contents to the terminal output.

Requirements#

File System Core

Synopsis#

fs_od [file]

Arguments#

Argument

Detail

Example

file

Name of file to dump to terminal output.

fs_od file.txt

-h

Displays a description of the command.

fs_cat -h

Notes / Warnings#

None.

fs_pwd#

Description#

Write to terminal output pathname of current working directory.

Requirements#

File System Core

Synopsis#

fs_pwd

Arguments#

None.

Notes / Warnings#

None.

Figure - fs_od output Figure - fs_od output

fs_rm#

Description#

Remove a file.

Requirements#

File System Core

Synopsis#

fs_rm [file]

Arguments#

Argument

Detail

Example

file

File name.

fs_rm file.txt

-h

Displays a description of the command.

fs_rm -h

Notes / Warnings#

None.

fs_rm#

Description#

Remove a file.

Requirements#

File System Core

Synopsis#

fs_rm [file]

Arguments#

Argument

Detail

Example

file

File name.

fs_rm file.txt

-h

Displays a description of the command.

fs_rm -h

Notes / Warnings#

None.

fs_rmdir#

Description#

Remove a directory.

Requirements#

File System Core

Synopsis#

fs_rmdir [dir]

Arguments#

Argument

Detail

Example

dir

Directory name.

fs_rmdir dir

-h

Displays a description of the command.

fs_rmdir -h

Notes / Warnings#

None.

fs_touch#

Description#

Change file modification time.

Requirements#

File System Core

Synopsis#

fs_touch [file]

Arguments#

Argument

Detail

Example

file

File name.

fs_touch file.txt

-h

Displays a description of the command.

fs_touch -h

Notes / Warnings#

The file modification time is set to the current time.

fs_umount#

Description#

Unount volume.

Requirements#

File System Core

Synopsis#

fs_umount [vol]

Arguments#

Argument

Detail

Example

vol

Volume to unmount.

fs_umount volume1

-h

Displays a description of the command.

fs_umount -h

Notes / Warnings#

None.

fs_wc#

Description#

Determine the number of newlines, words and bytes in a file.

Requirements#

File System Core

Synopsis#

fs_wc [file]

Arguments#

Argument

Detail

Example

file

File to examine.

fs_wc file.txt

-h

Displays a description of the command.

fs_wc -h

Notes/Warnings#

None.

Figure - fs_wc output Figure - fs_wc output