Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

file rename

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
file rename source destination 

Description

Rename a file on the local router or switch.

Options

destination

New name for the file.

source

Original name of the file. For a routing matrix, the filename must include the chassis information.

Required Privilege Level

maintenance

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

file rename

The following example lists the files in /var/tmp, renames one of the files, and then displays the list of files again to reveal the newly named file.

content_copy zoom_out_map
user@host> file list /var/tmp             
dcd.core
rpd.core
snmpd.core
content_copy zoom_out_map
user@host> file rename /var/tmp/dcd.core /var/tmp/dcd.core.990413             
content_copy zoom_out_map
user@host> file list /var/tmp             
dcd.core.990413
rpd.core
snmpd.core

file rename (Routing Matrix)

The following example lists the files in /var/tmp, renames one of the files, and then displays the list of files again to reveal the newly named file.

content_copy zoom_out_map
user@host> file list lcc0-re1:/var/tmp                 
lcc0-re1:
--------------------------------------------------------------------------

/var/tmp:
.pccardd
sartre.conf         
snmpd               
syslogd.core-tarball.0.tgz

user@host> file rename lcc0-re0:/var/tmp/snmpd /var/tmp/snmpd.rr             
user@host> file list lcc0-re1:/var/tmp             
lcc0-re1:
--------------------------------------------------------------------------

/var/tmp:
.pccardd
sartre.conf         
snmpd.rr 
syslogd.core-tarball.0.tgz

Release Information

Command introduced before Junos OS Release 7.4.

footer-navigation