Managing Configuration Files


Configuration files can be copied, deleted, or renamed in the system, but system files should not be deleted.

The L2/L3 configuration is stored in /pica/config/pica_startup.boot.

admin@XorPlus$
admin@XorPlus$cd /pica/config/
admin@XorPlus$ls
admin  pica.conf  pica.conf.01  pica.conf.02  pica.conf.03  pica.conf.04  pica.conf.05  pica_startup.boot root

 

User can display the files of a specified directory:

admin@XorPlus> file list /
drwxr-xr-x 2 root xorp 4096 Sep 25 00:54 bin
drwxr-xr-x 2 root xorp 4096 Sep 24 06:21 boot
drwxr-xr-x 2 root xorp 4096 Sep 23 17:05 cftmp
-rwxr-xr-x 1 root xorp 40559 Sep 23 17:05 config.bcm
drwxr-xr-x 4 root root 4096 Sep 25 00:54 dev
drwxr-xr-x 7 root xorp 4096 Sep 25 00:55 etc
drwxr-xr-x 4 root xorp 4096 Sep 24 06:21 lib
lrwxrwxrwx 1 root root 11 Sep 24 06:21 linuxrc -> bin/busybox
drwxr-xr-x 5 root xorp 4096 Sep 24 06:21 mnt
drwxr-xr-x 2 root xorp 4096 Sep 23 17:05 opt
drwxr-xr-x 5 root xorp 4096 Sep 24 06:21 ovs
drwxr-xr-x 14 root xorp 4096 Sep 24 06:23 pica
dr-xr-xr-x 52 root root 0 Jan 1 1970 proc
-rwxr-xr-x 1 root xorp 59012 Sep 23 17:05 rc.soc
drwxr-xr-x 2 root xorp 4096 Sep 24 06:21 sbin
drwxr-xr-x 11 root root 0 Jan 1 1970 sys
drwxrwxrwx 8 root xorp 1024 Sep 25 00:55 tmp
drwxr-xr-x 7 root xorp 4096 Sep 24 06:22 usr
drwxr-xr-x 7 root xorp 4096 Sep 24 06:23 var
admin@XorPlus> file list /tmp
drwxrwxr-x 5 root xorp 1024 Sep 25 00:54 home
drwxrwxr-x 2 root xorp 1024 Sep 25 00:54 log
drwx------ 2 root root 12288 Sep 25 00:54 lost+found
drwxrwxr-x 3 root xorp 1024 Sep 25 00:55 run
drwxrwxr-x 2 root xorp 1024 Sep 25 00:54 snmp
drwxrwxr-x 2 root xorp 1024 Sep 25 00:56 system

 

Display the contents of a specified file:

--    1 root     root          410 Sep 24 06:23 boot.lst
-rw-rw-r-- 1 root xorp 16006 Sep 24 07:44 pica.conf
-rw-rw-r-- 1 root xorp 16003 Sep 24 07:22 pica.conf.01
-rw-rw-r-- 1 root xorp 15826 Sep 24 07:19 pica.conf.02
-rw-rw-r--1 root xorp 15536 Sep 24 07:18 pica.conf.03
-rw-rw-r-- 1 root xorp 15915 Sep 24 07:18 pica.conf.04
-rw-rw-r-- 1 root xorp 15567 Sep 24 07:09 pica.conf.05
drwxrwxrwx 2 root root 4096 Sep 24 06:25 root
admin@XorPlus> file show /pica/config/pica.conf
/*XORP Configuration File, v1.0*/
interface {
ecmp {
max-path: 4
hash-mapping {
field {
ingress-interface {
disable: false
}
vlan {
disable: false
}
ip-protocol {
disable: false
}
ip-source {
disable: false
}
ip-destination {
disable: false
}
port-source {
disable: false
}
port-destination {
disable: false
}
}
}
}

 

User can also copy, archive, checksum, compare, rename, and sync files.

admin@XorPlus> file list /pica/config 
-rw-r--r-- 1 root root 410 Sep 24 06:23 boot.lst
-rw-rw-r-- 1 root xorp 16006 Sep 24 07:44 pica.conf
-rw-rw-r-- 1 root xorp 16003 Sep 24 07:22 pica.conf.01
-rw-rw-r-- 1 root xorp 15826 Sep 24 07:19 pica.conf.02
-rw-rw-r-- 1 root xorp 15536 Sep 24 07:18 pica.conf.03
-rw-rw-r-- 1 root xorp 15915 Sep 24 07:18 pica.conf.04
-rw-rw-r-- 1 root xorp 15567 Sep 24 07:09 pica.conf.05
drwxrwxrwx 2 root root 4096 Sep 24 06:25 root
admin@XorPlus> file copy /pica/config/pica.conf 
Possible completions:
<destination-file> Copy files to and from the router
admin@XorPlus> file copy /pica/config/pica.conf /pica/config/ychen.conf
admin@XorPlus> file list /pica/config
-rw-r--r-- 1 root root 410 Sep 24 06:23 boot.lst
-rw-rw-r-- 1 root xorp 16006 Sep 24 07:44 pica.conf
-rw-rw-r-- 1 root xorp 16003 Sep 24 07:22 pica.conf.01
-rw-rw-r-- 1 root xorp 15826 Sep 24 07:19 pica.conf.02
-rw-rw-r-- 1 root xorp 15536 Sep 24 07:18 pica.conf.03
-rw-rw-r-- 1 root xorp 15915 Sep 24 07:18 pica.conf.04
-rw-rw-r-- 1 root xorp 15567 Sep 24 07:09 pica.conf.05
drwxrwxrwx 2 root root 4096 Sep 24 06:25 root
-rw-rw-r-- 1 root root 16006 Sep 25 02:22 ychen.conf
admin@XorPlus>
admin@XorPlus> file rename /pica/config/ychen.conf /pica/config/ychen-1.conf
admin@XorPlus> file list /pica/config
-rw-r--r-- 1 root root 410 Sep 24 06:23 boot.lst
-rw-rw-r-- 1 root xorp 16006 Sep 24 07:44 pica.conf
-rw-rw-r-- 1 root xorp 16003 Sep 24 07:22 pica.conf.01
-rw-rw-r-- 1 root xorp 15826 Sep 24 07:19 pica.conf.02
-rw-rw-r-- 1 root xorp 15536 Sep 24 07:18 pica.conf.03
-rw-rw-r-- 1 root xorp 15915 Sep 24 07:18 pica.conf.04
-rw-rw-r-- 1 root xorp 15567 Sep 24 07:09 pica.conf.05
drwxrwxrwx 2 root root 4096 Sep 24 06:25 root
-rw-rw-r-- 1 root root 16006 Sep 25 02:22 ychen-1.conf
admin@XorPlus>
admin@XorPlus> file checksum /pica/config/ychen-1.conf
3559192236 16006 /pica/config/ychen-1.conf
admin@XorPlus>
admin@XorPlus> file sync
admin@XorPlus>
admin@XorPlus> file compare /pica/config/pica.conf /pica/config/pica.conf.01
admin@XorPlus> file compare /pica/config/pica.conf /pica/config/pica.conf.01
3c3
< /*Last commit     : Mon Jan 13 14:13:01 2014 by admin*/
---
> /*Last commit     : Mon Jan 13 14:12:26 2014 by admin*/
510,514d509
< controller 1 {
< protocol: "tcp"
< address: 10.10.50.47
< port: 6633
< }

 

User can change the current directory using functions like  cwd  or cd.

admin@XorPlus> file cwd 
Current working directory: /tmp/home/admin 
admin@XorPlus>
admin@XorPlus> file cwd /pica/config
admin@XorPlus> file cwd 
Current working directory: /pica/config 
admin@XorPlus>

Copyright © 2024 Pica8 Inc. All Rights Reserved.