github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/commands/rclone_touch.md (about)

     1  ---
     2  title: "rclone touch"
     3  description: "Create new file or change file modification time."
     4  slug: rclone_touch
     5  url: /commands/rclone_touch/
     6  groups: Filter,Listing,Important
     7  versionIntroduced: v1.39
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/touch/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone touch
    11  
    12  Create new file or change file modification time.
    13  
    14  ## Synopsis
    15  
    16  
    17  Set the modification time on file(s) as specified by remote:path to
    18  have the current time.
    19  
    20  If remote:path does not exist then a zero sized file will be created,
    21  unless `--no-create` or `--recursive` is provided.
    22  
    23  If `--recursive` is used then recursively sets the modification
    24  time on all existing files that is found under the path. Filters are supported,
    25  and you can test with the `--dry-run` or the `--interactive`/`-i` flag.
    26  
    27  If `--timestamp` is used then sets the modification time to that
    28  time instead of the current time. Times may be specified as one of:
    29  
    30  - 'YYMMDD' - e.g. 17.10.30
    31  - 'YYYY-MM-DDTHH:MM:SS' - e.g. 2006-01-02T15:04:05
    32  - 'YYYY-MM-DDTHH:MM:SS.SSS' - e.g. 2006-01-02T15:04:05.123456789
    33  
    34  Note that value of `--timestamp` is in UTC. If you want local time
    35  then add the `--localtime` flag.
    36  
    37  
    38  ```
    39  rclone touch remote:path [flags]
    40  ```
    41  
    42  ## Options
    43  
    44  ```
    45    -h, --help               help for touch
    46        --localtime          Use localtime for timestamp, not UTC
    47    -C, --no-create          Do not create the file if it does not exist (implied with --recursive)
    48    -R, --recursive          Recursively touch all files
    49    -t, --timestamp string   Use specified time instead of the current time of day
    50  ```
    51  
    52  
    53  ## Important Options
    54  
    55  Important flags useful for most commands.
    56  
    57  ```
    58    -n, --dry-run         Do a trial run with no permanent changes
    59    -i, --interactive     Enable interactive mode
    60    -v, --verbose count   Print lots more stuff (repeat for more)
    61  ```
    62  
    63  ## Filter Options
    64  
    65  Flags for filtering directory listings.
    66  
    67  ```
    68        --delete-excluded                     Delete files on dest excluded from sync
    69        --exclude stringArray                 Exclude files matching pattern
    70        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
    71        --exclude-if-present stringArray      Exclude directories if filename is present
    72        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
    73        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
    74    -f, --filter stringArray                  Add a file filtering rule
    75        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
    76        --ignore-case                         Ignore case in filters (case insensitive)
    77        --include stringArray                 Include files matching pattern
    78        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
    79        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
    80        --max-depth int                       If set limits the recursion depth to this (default -1)
    81        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
    82        --metadata-exclude stringArray        Exclude metadatas matching pattern
    83        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
    84        --metadata-filter stringArray         Add a metadata filtering rule
    85        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
    86        --metadata-include stringArray        Include metadatas matching pattern
    87        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
    88        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
    89        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
    90  ```
    91  
    92  ## Listing Options
    93  
    94  Flags for listing directories.
    95  
    96  ```
    97        --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
    98        --fast-list           Use recursive list if available; uses more memory but fewer transactions
    99  ```
   100  
   101  See the [global flags page](/flags/) for global options not listed here.
   102  
   103  # SEE ALSO
   104  
   105  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   106