Juniper SRX 殼層與操作模式檔案的路徑差異
Juniper SRX 殼層與操作模式檔案的路徑差異
每種模式的命令是彼此獨立的,因此模式不同,命令操作也不盡相同,如下所示:
先前有點誤會,以為是殼層與操作模式檔案的路徑有差異,結果答案如下:
root@srx100> file list /var/
/var/:
at@ -> /cf/var/at
crash@ ->
/cf/var/crash
cron@ -> /cf/var/cron
db@ -> /cf/var/db
empty/
etc@ -> /mfs/var/etc
home@ -> /cf/var/home
jail@ -> /cf/var/jail
log@ -> /cf/var/log
named@ ->
/cf/etc/namedb
packages@ ->
/cf/packages
pdb@ -> /cf/var/pdb
run@ -> /mfs/var/run
sw@ -> /cf/var/sw
tmp@ -> /cf/var/tmp
transfer@ ->
/cf/var/transfer
validate@ ->
/cf/var/validate
原來是/var/的目錄都會連結到另一個特定的目錄的關係,以下為相關試驗:
root@srx100% cp /var/tmp/usb/FBF-2WAN.conf /var/tmp
root@srx100% cp /var/tmp/usb/FBF-2WAN.conf /var/tmp/
FBF-2WAN2.conf
root@srx% cli
##離開殼層進入操作模式
root@srx100> file list /var/tmp ##操作模式要使用file list命令
/var/tmp@ ->
/cf/var/tmp
root@srx100> file list cf/var/tmp
/cf/root/cf/var/tmp: No such file or
directory ##路徑要明確指定才行
root@srx100> file list /cf/var/tmp ##這才是正確的路徑
/cf/var/tmp/:
FBF-2WAN.conf*
FBF-2WAN2.conf*
cleanup-pkgs.log
eedebug_bin_file
gksdchk.log
gres-tp/
idp_license_info
install/
kmd.core-tarball.0.tgz
kmd.core-tarball.1.tgz
kmd.core-tarball.2.tgz
kmdchk.log
krt_gencfg_filter.txt
pics/
policy_status
rtsdb/
sec-download/
spu_kmd_init
srx-ok.conf*
usb/
root@srx100> file list /var/tmp/
/cf/var/tmp/:
FBF-2WAN.conf*
FBF-2WAN2.conf*
cleanup-pkgs.log
eedebug_bin_file
gksdchk.log
gres-tp/
idp_license_info
install/
kmd.core-tarball.0.tgz
kmd.core-tarball.1.tgz
kmd.core-tarball.2.tgz
kmdchk.log
krt_gencfg_filter.txt
pics/
policy_status
rtsdb/
sec-download/
spu_kmd_init
srx-ok.conf*
usb/
root@srx100> file delete /var/tmp/FBF-2WAN.conf
root@srx100> file delete /cf/var/tmp/FBF-2WAN2.conf
root@srx100> file list /var/tmp/
/cf/var/tmp/:
cleanup-pkgs.log
eedebug_bin_file
gksdchk.log
gres-tp/
idp_license_info
install/
kmd.core-tarball.0.tgz
kmd.core-tarball.1.tgz
kmd.core-tarball.2.tgz
kmdchk.log
krt_gencfg_filter.txt
pics/
policy_status
rtsdb/
sec-download/
spu_kmd_init
srx-ok.conf*
usb/
root@srx100>