Generic Files

Uploading Files

This command is used to upload files to Artifactory.

Usage

jf rt u [command options] <Source path> <Target path> jf rt u --spec=<File Spec path> [command options]

Commands Params

Command name

rt upload

Abbreviation

rt u

Command arguments:

The command takes two arguments, source path and target path. In case the --spec option is used, the commands accept no arguments.

Source path

The first argument specifies the local file system path to artifacts that should be uploaded to Artifactory. You can specify multiple artifacts by using wildcards or a regular expression as designated by the --regexp command option. Please read the --regexp option description for more information.

Target path

The second argument specifies the target path in Artifactory in the following format: [repository name]/[repository path] If the target path ends with a slash, the path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be uploaded. If there is no terminal slash, the target path is assumed to be a file to which the uploaded file should be renamed. For example, if you specify the target as "repo-name/a/b", the uploaded file is renamed to "b" in Artifactory. For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

Command options:

When using the * or ; characters in the upload command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--archive

[Optional] Set to "zip" to pack and deploy the files to Artifactory inside a ZIP archive. Currently, the only packaging format supported is zip.

--server-id

[Optional] Server ID configured using the jf c add command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--spec-vars

[Optional] List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

--build-name

[Optional] Build name. For more details, please refer to Build Integration.

--build-number

[Optional] Build number. For more details, please refer to Build Integration.

--project

[Optional] JFrog project key.

--module

[Optional] Optional module name for the build-info.

--target-props

[Optional] List of semicolon-separated(;) Artifactory properties specified as "key=value" pairs to be attached to the uploaded files.(for example: "key1=value1;key2=value21,value22;key3=value3".

--deb

[Optional] Used for Debian packages only. Specifies the distribution/component/architecture of the package. If the the value for distribution, component or architecture include a slash. the slash should be escaped with a back-slash.

--flat

[Default: false] If true, files are uploaded to the exact target path specified and their hierarchy in the source file system is ignored. If false, files are uploaded to the target path while maintaining their file system hierarchy. If Using Placeholders are used, the value of this option is ignored. Note JFrog CLI v1 In JFrog CLI v1, the default value of the --flat option is true.

--recursive

[Default: true] If true, files are also collected from sub-folders of the source directory for upload . If false, only files specifically in the source directory are uploaded.

--regexp

[Default: false] If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as a regular expression. If false, it will interpret the first argument as a wild-card expression. The above also applies for the --exclusions option. If you have specified that you are using regular expressions, then the beginning of the expression must be enclosed in parenthesis. For example: a/b/c/(.*)/file.zip

--ant

[Default: false] If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as an ANT pattern. If false, it will interpret the first argument as a wildcards expression. The above also applies for the --exclusions option.

--threads

[Default: 3] The number of parallel threads that should be used to upload where each thread uploads a single artifact at a time.

--dry-run

[Default: false] If true, the command only indicates which artifacts would have been uploaded If false, the command is fully executed and uploads artifacts as specified

--symlinks

[Default: false] If true, the command will preserve the soft links structure in Artifactory. The symlink file representation will contain the symbolic link and checksum properties.

--explode

[Default: false] If true, the command will extract an archive containing multiple artifacts after it is deployed to Artifactory, while maintaining the archive's file structure.

--include-dirs

[Default: false] If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

--exclusions

[Optional] A list of semicolon-separated(;) exclude patterns. Allows using wildcards, regular expressions or ANT patterns, according to the value of the --regexp and --ant options. Please read the --regexp and --ant options description for more information.

--sync-deletes

[Optional] Specific path in Artifactory, under which to sync artifacts after the upload. After the upload, this path will include only the artifacts uploaded during this upload operation. The other files under this path will be deleted.

--quiet

[Default: false] If true, the delete confirmation message is skipped.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--retries

[Default: 3] Number of upload retries.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

--detailed-summary

[Default: false] Set to true to include a list of the affected files as part of the command output summary.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--min-split

[Default: 200] The minimum file size in MiB required to attempt a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.

--split-count

[Default: 5] The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.

Examples

Example 1

Upload a file called froggy.tgz to the root of the my-local-repo repository.

jf rt u froggy.tgz my-local-repo

Example 2

Collect all the zip files located under the build directory (including subdirectories), and upload them to the my-local-repo repository, under the zipFiles folder, while maintaining the original names of the files.

jf rt u "build/*.zip" my-local-repo/zipFiles/

Example 3

Collect all the zip files located under the build directory (including subdirectories), and upload them to the my-local-repo repository, under the zipFiles folder, while maintaining the original names of the files. Also delete all files in the my-local-repo repository, under the zipFiles folder, except for the files which were uploaded by this command.

jf rt u "build/*.zip" my-local-repo/zipFiles/ --sync-deletes="my-local-repo/zipFiles/"

Example 4

Collect all files located under the build directory (including subdirectories), and upload them to the my-release-local repository, under the files folder, while maintaining the original names of the artifacts. Exclude (do not upload) files, which include install as part of their path, and have the pack extension. This example uses a wildcard pattern. See Example 5, which uses regular expressions instead.

jf rt u "build/" my-release-local/files/ --exclusions="\*install\*pack*"

Example 5

Collect all files located under the build directory (including subdirectories), and upload them to the my-release-local repository, under the files folder, while maintaining the original names of the artifacts. Exclude (do not upload) files, which include install as part of their path, and have the pack extension. This example uses a regular expression. See Example 4, which uses a wildcard pattern instead.

jf rt u "build/" my-release-local/files/ --regexp --exclusions="(.*)install.*pack$"

Example 6

Collect all files located under the build directory and match the /*.zip ANT pattern, and upload them to the my-release-local repository, under the files folder, while maintaining the original names of the artifacts.

jf rt u "build/**/*.zip" my-release-local/files/ --ant

Example 7

Package all files located under the build directory (including subdirectories) into a zip archive named archive.zip , and upload the archive to the my-local-repo repository,

jf rt u "build/" my-local-repo/my-archive.zip --archive zip

Downloading Files

This command is used to download files from Artifactory.

Download from Remote Repositories: By default, the command only downloads files that are cached on the current Artifactory instance. It does not download files located on remote Artifactory instances, through remote or virtual repositories. To allow the command to download files from remote Artifactory instances, which are proxied by the use of remote repositories, set the JFROG_CLI_TRANSITIVE_DOWNLOAD_EXPERIMENTAL environment variable to true. This functionality requires version 7.17 or above of Artifactory. The remote download functionality is supported only on remote repositories which proxy repositories on remote Artifactory instances. Downloading through a remote repository that proxies non-Artifactory repositories is not supported.

Usage

jf rt dl [command options] <Source path> [Target path] jf rt dl --spec=<File Spec path> [command options]

Commands Params

Command name

rt download

Abbreviation

rt dl

Command arguments:

The command takes two arguments source path and target path (Optional). In case the --spec option is used, the commands accept no arguments.

Source path

Specifies the source path in Artifactory, from which the artifacts should be downloaded. You can use wildcards to specify multiple artifacts.

Target path

The second argument is optional and specifies the local file system target path. If the target path ends with a slash, the path is assumed to be a directory. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a directory into which files should be downloaded. If there is no terminal slash, the target path is assumed to be a file to which the downloaded file should be renamed. For example, if you specify the target as "a/b", the downloaded file is renamed to "b". For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

Command options:

When using the * or ; characters in the download command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--build-name

[Optional] Build name. For more details, please refer to Build Integration.

--build-number

[Optional] Build number. For more details, please refer to Build Integration.

--project

[Optional] JFrog project key.

--module

[Optional] Optional module name for the build-info.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--spec-vars

[Optional] List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

--props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with all of the specified properties names and values will be downloaded.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be downloaded.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--flat

[Default: false] If true, artifacts are downloaded to the exact target path specified and their hierarchy in the source repository is ignored. If false, artifacts are downloaded to the target path in the file system while maintaining their hierarchy in the source repository. If Using Placeholders are used, and you would like the local file system (download path) to be determined by placeholders only, or in other words, avoid concatenating the Artifactory folder hierarchy local, set to false.

--recursive

[Default: true] If true, artifacts are also downloaded from sub-paths under the specified path in the source repository. If false, only artifacts in the specified source path directory are downloaded.

--threads

[Default: 3] The number of parallel threads that should be used to download where each thread downloads a single artifact at a time.

--split-count

[Default: 3] The number of segments into which each file should be split for download (provided the artifact is over --min-split in size). To download each file in a single thread, set to 0.

--retries

[Default: 3] Number of download retries.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

--min-split

[Default: 5120] The minimum size permitted for splitting. Files larger than the specified number will be split into equally sized --split-count segments. Any files smaller than the specified number will be downloaded in a single thread. If set to -1, files are not split.

--dry-run

[Default: false] If true, the command only indicates which artifacts would have been downloaded. If false, the command is fully executed and downloads artifacts as specified.

--explode

[Default: false] Set to true to extract an archive after it is downloaded from Artifactory. Supported compression formats: br, bz2, gz, lz4, sz, xz, zstd. Supported archive formats: zip, tar (including any compressed variants like tar.gz), rar.

--bypass-archive-inspection

[Default: false] Set to true to bypass the archive security inspection before it is unarchived. Used with the explode option.

'--validate-symlinks'

[Default: false] If true, the command will validate that symlinks are pointing to existing and unchanged files, by comparing their sha1. Applicable to files and not directories.

--include-dirs

[Default: false] If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--sync-deletes

[Optional] Specific path in the local file system, under which to sync dependencies after the download. After the download, this path will include only the dependencies downloaded during this download operation. The other files under this path will be deleted.

--quiet

[Default: false] If true, the delete confirmation message is skipped.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--detailed-summary

[Default: false] Set to true to include a list of the affected files as part of the command output summary.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--gpg-key

[Optional] Path to the public GPG key file located on the file system, used to validate downloaded release bundle files.

Examples

Example 1

Download an artifact called cool-froggy.zip located at the root of the my-local-repo repository to the current directory.

jf rt dl my-local-repo/cool-froggy.zip

Example 2

Download all artifacts located under the all-my-frogs directory in the my-local-repo repository to the all-my-frogs folder under the current directory.

jf rt dl my-local-repo/all-my-frogs/ all-my-frogs/

Example 3

Download all artifacts located in the **my-local-repo **repository with a jar extension to the all-my-frogs folder under the current directory.

jf rt dl "my-local-repo/*.jar" all-my-frogs/

Example 4

Download the latest file uploaded to the all-my-frogs folder in the my-local-repo repository.

jf rt dl  "my-local-repo/all-my-frogs/" --sort-by=created --sort-order=desc --limit=1

Copying Files

This command is used to copy files in Artifactory

Usage

jf rt cp [command options] <Source path> <Target path> jf rt cp --spec=<File Spec path> [command options]

Commands Params

Command name

rt copy

Abbreviation

rt cp

Command arguments:

The command takes two arguments source path and target path. In case the --spec option is used, the commands accept no arguments.

Source path

Specifies the source path in Artifactory, from which the artifacts should be copied, in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

Target path

Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: [repository name]/[repository path] By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. If there is no terminal slash, the target path is assumed to be a file to which the copied file should be renamed. For example, if you specify the target as "repo-name/a/b", the copied file is renamed to "b" in Artifactory. For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

Command options:

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs. (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be copied.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be copied.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--flat

[Default: false] If true, artifacts are copied to the exact target path specified and their hierarchy in the source path is ignored. If false, artifacts are copied to the target path while maintaining their source path hierarchy.

--recursive

[Default: true] If true, artifacts are also copied from sub-paths under the specified source path. If false, only artifacts in the specified source path directory are copied.

--dry-run

[Default: false] If true, the command only indicates which artifacts would have been copied. If false, the command is fully executed and copies artifacts as specified.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--threads

[Default: 3] Number of threads used for copying the items.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--retries

[Default: 3] Number for HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

Examples

Example 1

Copy all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository.

jf rt cp source-frog-repo/rabbit/ target-frog-repo/rabbit/

Example 2

Copy all zip files located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository.

jf rt cp "source-frog-repo/rabbit/*.zip" target-frog-repo/rabbit/

Example 3

Copy all artifacts located under /rabbit in the source-frog-repo repository and with property "Version=1.0" into the same path in the target-frog-repo repository.

jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0

Example 4

Copy all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository without maintaining the original subdirectory hierarchy.

jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat

Moving Files

This command is used to move files in Artifactory

Usage

jf rt mv [command options] <Source path> <Target path> jf rt mv --spec=<File Spec path> [command options]

Commands Params

Command name

rt move

Abbreviation

rt mv

Command arguments:

The command takes two arguments source path and target path. In case the --spec option is used, the commands accept no arguments.

Source path

Specifies the source path in Artifactory, from which the artifacts should be moved, in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

Target path

Specifies the target path in Artifactory, to which the artifacts should be moved, in the following format: [repository name]/[repository path] By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be moved. If there is no terminal slash, the target path is assumed to be a file to which the moved file should be renamed. For example, if you specify the target as "repo-name/a/b", the moved file is renamed to "b" in Artifactory. For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

Command options:

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be moved.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be moved.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--flat

[Default: false] If true, artifacts are moved to the exact target path specified and their hierarchy in the source path is ignored. If false, artifacts are moved to the target path while maintaining their source path hierarchy.

--recursive

[Default: true] If true, artifacts are also moved from sub-paths under the specified source path. If false, only artifacts in the specified source path directory are moved.

--dry-run

[Default: false] If true, the command only indicates which artifacts would have been moved. If false, the command is fully executed and downloads artifacts as specified.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--threads

[Default: 3] Number of threads used for moving the items.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--retries

[Default: 3] Number of HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

Examples

Example 1

Move all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository.

jf rt mv source-frog-repo/rabbit/ target-frog-repo/rabbit/

Example 2

Move all zip files located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository.

jf rt mv "source-frog-repo/rabbit/*.zip" target-frog-repo/rabbit/

Example 3

Move all artifacts located under /rabbit in the source-frog-repo repository and with property "Version=1.0" into the same path in the target-frog-repo repository .

jf rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0

Example 4

Move all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository without maintaining the original subdirectory hierarchy.

jf rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat

Deleting Files

This command is used to delete files in Artifactory

Usage

jf rt del [command options] <Delete path> jf rt del --spec=<File Spec path> [command options]

Commands Params

Command name

rt delete

Abbreviation

rt del

Command arguments:

The command takes one argument which is the delete path. In case the --spec option is used, the commands accept no arguments.

Delete path

Specifies the path in Artifactory of the files that should be deleted in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

Command options:

When using the * or ; characters in the delete command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be deleted.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be deleted.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--recursive

[Default: true] If true, artifacts are also deleted from sub-paths under the specified path.

--quiet

[Default: false] If true, the delete confirmation message is skipped.

--dry-run

[Default: false] If true, the command only indicates which artifacts would have been deleted. If false, the command is fully executed and deletes artifacts as specified.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--threads

[Default: 3] Number of threads used for deleting the items.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--retries

[Default: 3] Number of HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

Examples

Example 1

Delete all artifacts located under /rabbit in the frog-repo repository.

jf rt del frog-repo/rabbit/

Example 2

Delete all zip files located under /rabbit in the frog-repo repository.

jf rt del "frog-repo/rabbit/*.zip"

Searching Files

This command is used to search and display files in Artifactory.

Usage

jf rt s [command options] <Search path> jf rt s --spec=<File Spec path> [command options]

Commands Params

Command name

rt search

Abbreviation

rt s

Command arguments:

The command takes one argument which is the search path. In case the --spec option is used, the commands accept no arguments.

Search path

Specifies the search path in Artifactory, in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

Command options:

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--count

[Optional] Set to true to display only the total of files or folders found.

--include-dirs

[Default: false] Set to true if you'd like to also apply the source path pattern for directories and not only for files

--spec-vars

[Optional] List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

--props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be returned.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be returned.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--recursive

[Default: true] Set to false if you do not wish to search artifacts inside sub-folders in Artifactory.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--transitive

[Optional] Set to true to look for artifacts also in remote repositories. Available on Artifactory version 7.17.0 or higher.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--retries

[Default: 3] Number of HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

--include

[Optional] List of semicolon-separated(;) fields in the form of "value1;value2;...". Only the path and the fields that are specified will be returned. The fields must be part of the items AQL domain. for the full supported items list check AQL documentation

Examples

Example 1

Display a list of all artifacts located under /rabbit in the frog-repo repository.

jf rt s frog-repo/rabbit/

Example 2

Display a list of all zip files located under /rabbit in the frog-repo repository.

jf rt s "frog-repo/rabbit/*.zip"

Example 3

Display a list of the files under example-repo-local with the following fields: path, actual_md5, modified_b, updated and depth.

jf rt s example-repo-local --include="actual_md5;modified_by;updated;depth"

Setting Properties on Files

This command is used for setting properties on existing files in Artifactory.

Usage

jf rt sp [command options] <Files pattern> <Files properties> jf rt sp <artifact properties> --spec=<File Spec path> [command options]

Commands Params

Command name

rt set-props

Abbreviation

rt sp

Command arguments:

The command takes two arguments, files pattern and files properties. In case the --spec option is used, the commands accept no arguments.

Files pattern

Files that match the pattern will be set with the specified properties.

Files properties

A list of semicolon-separated(;) key-values in the form of key1=value1;key2=value2,..., to be set on the matching files.

Command options:

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--spec

[Optional] Path to a file spec. For more details, please refer to Using File Specs.

--spec-vars

[Optional] List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

--props

[Optional] List of semicolon-separated(;) properties in the form of "key1=value1;key2=value2,...". Only files with these properties names and values are affected.

--exclude-props

[Optional] A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

--recursive

[Default: true] When false, artifacts inside sub-folders in Artifactory will not be affected.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--include-dirs

[Default: false] When true, the properties will also be set on folders (and not just files) in Artifactory.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--exclusions

A list of semicolon-separated(;) exclude patterns. Allows using wildcards.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--threads

[Default: 3] Number of working threads.

--retries

[Default: 3] Number of HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

Examples

Example 1

Set the properties on all the zip files in the generic-local repository. The command will set the property "a" with "1" value and the property "b" with two values: "2" and "3".

jf rt sp "generic-local/*.zip" "a=1;b=2,3"

Example 2

The command will set the property "a" with "1" value and the property "b" with two values: "2" and "3" on all files found by the File Spec my-spec.

jf rt sp "a=1;b=2,3" --spec my-spec

Example 3

Set the properties on all the jar files in the maven-local repository. The command will set the property "version" with "1.0.0" value and the property "release" with "stable" value.

jf rt sp "maven-local/*.jar" "version=1.0.0;release=stable"

Example 4

The command will set the property "environment" with "production" value and the property "team" with "devops" value on all files found by the File Spec prod-spec.

jf rt sp "environment=production;team=devops" --spec prod-spec

Example 5

Set the properties on all the tar.gz files in the devops-local repository. The command will set the property "build" with "102" value and the property "branch" with "main" value.

jf rt sp "devops-local/*.tar.gz" "build=102;branch=main"

Deleting Properties from Files

This command is used for deleting properties from existing files in Artifactory.

Usage

jf rt delp [command options] <Files pattern> <Properties list> jf rt delp <artifact properties> --spec=<File Spec path> [command options]

Commands Params

Command name

rt delete-props

Abbreviation

rt delp

Command arguments:

The command takes two arguments, files pattern and properties list. In case the --spec option is used, the commands accept no arguments.

Files pattern

Specifies the files pattern in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple repositories and files.

Properties list

A comma-separated(,) list of properties, in the form of key1,key2,..., to be deleted from the matching files.

Command options:

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--server-id

[Optional] Artifactory Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

--props

[Optional] List of semicolon-separated(;) properties in the form of "key1=value1;key2=value2,...". Only files with these properties are affected.

--exclude-props

[Optional] List of semicolon-separated(;) Artifactory properties specified as "key=value" (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

--recursive

[Default: true] When false, artifacts inside sub-folders in Artifactory will not be affected.

--build

[Optional] If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

--bundle

[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

--include-dirs

[Default: false] When true, the properties will also be set on folders (and not just files) in Artifactory.

--fail-no-op

[Default: false] Set to true if you'd like the command to return exit code 2 in case of no files are affected.

--exclusions

List of semicolon-separated(;) exclude patterns. Allows using wildcards.

--sort-by

[Optional] A list of semicolon-separated(;) fields to sort by. The fields must be part of the items AQL domain. For more information read the AQL documentation

--sort-order

[Default: asc] The order by which fields in the 'sort-by' option should be sorted. Accepts asc or desc.

--limit

[Optional] The maximum number of items to fetch. Usually used with the 'sort-by' option.

--offset

[Optional] The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

--archive-entries

[Optional] If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

--insecure-tls

[Default: false] Set to true to skip TLS certificates verification.

--retries

[Default: 3] Number of HTTP retry attempts.

--retry-wait-time

[Default: 0s] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

Examples

Example 1

Remove the properties version and release from all the jar files in the maven-local repository.

jf rt delp "maven-local/*.jar" "version,release"

Example 2

Delete the properties build and branch from all tar.gz files in the devops-local repo.

jf rt delp "devops-local/*.tar.gz" "build,branch"

Example 3

Remove the properties status, phase and stage from all deb files that start with DEV in the debian-repository.

jf rt delp "debian-repository/DEV*.deb" "status,phase,stage"

Example 4

Delete the environment property from /tests/local/block.rpm in the centos-repo.

jf rt delp "centos-repo/tests/local/block.rpm" "environment"

Example 5

Remove the properties component, layer and level from files in the docker-hub repository.

jf rt delp "docker-hub/*" "component,layer,level"

Last updated

© 2024 JFrog Ltd All Rights Reserved