BarecatShell#
- class barecat.cli.shell.BarecatShell(archive_path, readonly=True)[source]#
Bases:
cmd.CmdInteractive shell for barecat archives, similar to sqlite3.
Instance Methods#
|
Change directory: cd [path] |
|
Print working directory |
|
List directory contents: ls [-l] [-R] [path_or_glob] |
|
List with sequence summarization: lss [path] |
|
Show directory tree: tree [-L N] [-d] [path] |
|
Print file contents: cat <path> |
|
Print first N bytes: head [-n N] <path> |
|
Show file/directory metadata: stat <path> |
|
Find files like /usr/bin/find: find [path] [-name PAT] [-type f|d] [-size [+-]N] [-maxdepth N] |
|
Show disk usage: du [-a] [-s] [-H] [-d N] [path] |
|
Change local directory: lcd [path] |
|
Print local working directory |
|
List local directory: lls [path] |
|
Extract file: get <archive_path> [local_dest] |
|
Extract files matching pattern: mget <pattern> [local_dest] |
|
Add file to archive: put <local_path> [archive_path] |
|
Add files matching glob: mput <pattern> [archive_dir] |
|
Remove file from archive: rm <path> |
|
Rename/move file in archive: mv <old> <new> |
|
Show archive info |
|
Execute SQL query or start SQL REPL: sql [query] |
|
Exit the shell |
|
Exit the shell |
|
Exit on Ctrl-D |
|
Handle .commands and ! shell escape |
|
Default completion handler. |
Do nothing on empty line (don't repeat last command). |
|
|
Command loop with Ctrl+C handling. |
|
Close the archive. |