hv command reference manual
$sub1(hv_credentials.md)
Path formats
Local paths refer to a file on the host file system.
Vault paths refer to a file mapped on the vault. They can start with // to refer to the root of the vault.
Some vault paths can optionally specify the revision of the path.
Special symbols were created to access specific revisions:
^ |
last revision available on the vault |
= |
current revision, that is synced on the site |
* |
all revisions |
Special file revision symbols
subdir/ |
means all files in all subdirectories |
subdir |
means all files in all subdirectories (same as subdir/) |
subdir/* |
means all files in the directory |
Directories and wildcards
Examples
Get the first revision of a file:
$ hv sync //malware/Ransomware.WannaCry/41aa.exe.i64#1
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#1 (838724 bytes)
ok sync completed
Sync to the last version of a file:
$ hv sync malware/Ransomware.WannaCry/41aa.exe.i64#^
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#3 (846916 bytes)
ok sync completed
Force sync to the current revision (we must specify -f to force a file transfer):
$ hv sync -f malware/Ransomware.WannaCry/41aa.exe.i64#=
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#2 (846916 bytes)
ok sync completed
Display md5 checksums of all revisions of a file:
$ hv md5 malware/Ransomware.WannaCry/41aa.exe.i64#*
ok 8F464140FA3DA4A20B03166F2E80325B //malware/Ransomware.WannaCry/41aa.exe.i64#1
ok E0F7B984151FEF497985F375C64FA5C7 //malware/Ransomware.WannaCry/41aa.exe.i64#2
ok 5C3B88306CF0D93DC35FFD67A710AE3B //malware/Ransomware.WannaCry/41aa.exe.i64#3
List Hex-Rays Vault server’s toplevel directory contents:
$ hv dir //
2022-06-02 10:29:30 140267 CL29/edit //malware/cppobj_virtcall.i64#9
2022-06-14 16:44:19 2173541 CL36/edit //iOS/dyld_ios16.i64#3
Plan to add a file to the vault:
$ hv add /path/to/local_rootdir/enable.png
ok added '//enabled.png'
Plan to add a directory:
$ hv add /path/to/local_rootdir/REsearch
ok added '//REsearch/vm2vm.dat'
ok added '//REsearch/vm2vm.exe'
ok added '//REsearch/vm2vm.i64'
Plan to delete a file:
$ hv del /path/to/local_rootdir/REsearch/*.dat
ok checked out '//REsearch/vm2vm.dat' for 'del' (worklist 1)
Show worklist to which files were added:
$ hv worklist show
WL 1 add //REsearch/vm2vm.exe#0
WL 1 add //REsearch/vm2vm.i64#0
WL 1 edit //cppobj_virtcall.i64#9
WL 1 add //enabled.png#0
It is safe to interrupt a command using Ctrl-C. The file transfers in action will be gracefully terminated, so that no partially received files will be left on the disk. However, the requests that were delivered to the server will still be carried out up to the completion. For example, if the user asked to check out thousands of files for editing, this will be performed even if the user presses Ctrl-C after invoking the command.
If the command syntax specifies ellipsis (…), it means that multiple path patterns can be specified. The path patterns can be specified using local paths or vault paths, which start with a double slash (//).
Commands
$sub2(site.md)
$sub2(file.md)
$sub2(worklist.md)
$sub2(info.md)
$sub2(misc.md)
$sub2(admin.md)
Concepts
$sub2(../../../shared.in/teams/concepts/site.md) $sub2(../../../shared.in/teams/concepts/resolving.md) $sub2(../../../shared.in/teams/concepts/hvignore.md) $sub2(../../../shared.in/teams/concepts/registry.md) $sub2(../../../shared.in/teams/concepts/keychain.md) $sub2(../../../shared.in/teams/concepts/permissions.md)