Hi,
You can try below.
labroot@jtac-ex4200-8poe-r2002> start shell
% cd /var/db/config/
% ls -ltr
total 184
-rw-r----- 1 root wheel 903 Sep 13 06:55 juniper.conf.31.gz
-rw-r----- 1 root wheel 898 Sep 13 10:06 juniper.conf.30.gz
-rw-r----- 1 root wheel 921 Sep 14 04:24 juniper.conf.29.gz
labroot@jtac-ex4200-8poe-r2002# show | display set | save /var/tmp/config.txt
Wrote 37 lines of output to '/var/tmp/config.txt'
{master:0}[edit]
labroot@jtac-ex4200-8poe-r2002# run start shell
% cd /var/tmp/
% ls -ltr | grep config.txt
-rw-r--r-- 1 labroot field 1984 Oct 28 06:39 config.txt