File and Disk Management Commands

df

Use the df command to display statistics about the amount of free disk space in the file system.

df

Command History

Release

Modification

3.0.0

This command was introduced.

Examples

This example shows how to check the disk usage of the folder /data in your file system:

root@center100:~# df -h /data/
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/data_crypt  245G  1.6G  230G   1% /data

This example calculates the disk usage of the /data/ directory, displays it in a human-readable format, and then sorts the output by size:

root@center100:~# du -sh /data/* | sort -h
4.0K	/data/extensions
4.0K	/data/flags
4.0K	/data/updates
16K	/data/lost+found
32K	/data/home
64K	/data/license
216K	/data/redis
109M	/data/log
122M	/data/etc
284M	/data/var
351M	/data/postgresql
774M	/data/tmp

For more information, see df.

du

Use the du command to analyze the disk usage.

du

Command History

Release

Modification

3.0.0

This command was introduced.

Examples

This example analyzes the disk usage in the /data directory:

root@center100:~# du -sh /data/
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/data_crypt  245G  1.6G  230G   1% /data
root@center100:~#

This example analyzes the disk usage in the /data directory and displays the output in a sorted format:

root@center100:~# du-sh /data/* | sort -h
4.0K    /data/extensions
4.0K    /data/flags
4.0K    /data/updates
16K    /data/lost+found
32K    /data/home
64K    /data/license
216K    /data/redis
109M    /data/log
122M    /data/etc
284M    /data/var
351M    /data/postgresql
774M    /data/tmp

For more information, see du.

lsblk

Use the lsblk command to list information about all available or the specified block devices.

lsblk [ options ] [ device... ]

Syntax Description

device

Name of the block device on the file system.

Command History

Release

Modification

3.0.0

This command was introduced.

Examples

To list all block devices in your system, run this command:

root@center100:~# lsblk

NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0            7:0    0 554.2M  1 loop  /
sda              8:0    0   250G  0 disk  
|-sda1           8:1    0  1022M  0 part  /system
`-sda2           8:2    0   249G  0 part  
  `-data_crypt 251:0    0   249G  0 crypt /data
zram0          252:0    0 125.6G  0 disk  [SWAP]

For more information, see lsblk.

rclone

Use the rclone command to sync or move Cisco Cyber Vision Center data between local and remote storages.

rclone [flags] [command]

Syntax Description

--failed

Lists failed services on the system.

status <name of the service>

Checks the status of the specific service.

restart <name of the service>

Restarts the specific service.

stop <name of the service> Stops the specific service.

Command History

Release

Modification

4.0

This command was introduced.

Examples

To find all available options and flags in the command, run this command:

root@center100:~# rclone


Usage:
  rclone [flags]
  rclone [command]

Available Commands:
  about           Get quota information from the remote.
  authorize       Remote authorization.
  backend         Run a backend specific command.
  cat             Concatenate any files and send them to stdout.
  check           Checks the files in the source and destination match.
  cleanup         Clean up the remote if possible.
  config          Enter an interactive configuration session.
  copy            Copy files from source to dest, skipping already copied.
  copyto          Copy files from source to dest, skipping already copied.
  copyurl         Copy url content to dest.
  cryptcheck      Cryptcheck checks the integrity of a crypted remote.
  cryptdecode     Cryptdecode returns unencrypted file names.
  dbhashsum       Produces a Dropbox hash file for all the objects in the path.
  dedupe          Interactively find duplicate files and delete/rename them.
  delete          Remove the contents of path.
  deletefile      Remove a single file from remote.
  genautocomplete Output completion script for a given shell.
  gendocs         Output markdown docs for rclone to the directory supplied.
  hashsum         Produces a hashsum file for all the objects in the path.
  help            Show help for rclone commands, flags and backends.
  link            Generate public link to file/folder.
  listremotes     List all the remotes in the config file.
  ls              List the objects in the path with size and path.
  lsd             List all directories/containers/buckets in the path.
  lsf             List directories and objects in remote:path formatted for parsing.
  lsjson          List directories and objects in the path in JSON format.
  lsl             List the objects in path with modification time, size and path.
  md5sum          Produces an md5sum file for all the objects in the path.
  mkdir           Make the path if it doesn't already exist.
  mount           Mount the remote as a mountpoint.
  move            Move files from source to dest.
  moveto          Move file or directory from source to dest.
  ncdu            Explore a remote with a text based user interface.
  obscure         Obscure password for use in the rclone config file.
  purge           Remove the path and all of its contents.
  rc              Run a command against a running rclone.
  rcat            Copies standard input to file on remote.
  rcd             Run rclone listening to remote control commands only.
  rmdir           Remove the path if empty.
  rmdirs          Remove empty directories under the path.
  selfupdate      Update the rclone binary.
  serve           Serve a remote over a protocol.
  settier         Changes storage class/tier of objects in remote.
  sha1sum         Produces an sha1sum file for all the objects in the path.
  size            Prints the total size and number of objects in remote:path.
  sync            Make source and dest identical, modifying destination only.
  test            Run a test command.
  touch           Create new file or change file modification time.
  tree            List the contents of the remote in a tree like fashion.
  version         Show the version number.

Flags:
  -h, --help   help for rclone

Use "rclone [command] --help" for more information about a command.

To enter in an interactive configuration session to set up new remotes and manage existing ones, run this command:

root@center100:~# rclone config
n/s/q> n (new remote storage)
name> cvbackupsftp
Storage> 34 (34 / SSH/SFTP Connection)
host> 10.2.3.172
user> user
port> [Enter]  (default 22)
y/g/n> y   (y: enter a password)
password: (enter password)
password: (re enter password)
key_pem> [Enter] (not used)
key_file> [Enter] (not used)
y/g/n> [Enter] (not used)
pubkey_file> [Enter] (not used)
key_use_agent>  [Enter]   (not used)
use_insecure_cipher> [Enter] (not used)
disable_hashcheck> [Enter] (not used)
y/n> n (no advanced setting)
y/e/d> y (validate settings)
e/n/d/r/c/s/q> q (quit config)

To move files from a source directory to a destination directory, run this command:

root@center100:~# rclone move center100:/tmp/example.txt center101:/tmp/example.txt

For more information, see rclone.