Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
jed /
lib /
[ HOME SHELL ]
Name
Size
Permission
Action
colors
[ DIR ]
drwxr-xr-x
abbrev.sl
838
B
-rw-r--r--
abbrev.slc
636
B
-rw-r--r--
abbrmisc.sl
2.15
KB
-rw-r--r--
abbrmisc.slc
1.98
KB
-rw-r--r--
aboutjed.hlp
252
B
-rw-r--r--
acompile.sl
2.04
KB
-rw-r--r--
acompile.slc
2.02
KB
-rw-r--r--
aprocess.sl
267
B
-rw-r--r--
aprocess.slc
238
B
-rw-r--r--
ashell.sl
7.69
KB
-rw-r--r--
ashell.slc
6.96
KB
-rw-r--r--
backups.sl
1.41
KB
-rw-r--r--
backups.slc
637
B
-rw-r--r--
bibtex.sl
17.05
KB
-rw-r--r--
bibtex.slc
12.74
KB
-rw-r--r--
binary.sl
589
B
-rw-r--r--
binary.slc
522
B
-rw-r--r--
bookmark.sl
1.6
KB
-rw-r--r--
bookmark.slc
1.2
KB
-rw-r--r--
brief.sl
5.98
KB
-rw-r--r--
buf.sl
3.41
KB
-rw-r--r--
buf.slc
1.96
KB
-rw-r--r--
bufed.sl
6.69
KB
-rw-r--r--
bufed.slc
4.68
KB
-rw-r--r--
bytecomp.sl
3.38
KB
-rw-r--r--
cal.sl
6.4
KB
-rw-r--r--
cal.slc
4.44
KB
-rw-r--r--
chglog.sl
3.13
KB
-rw-r--r--
chglog.slc
2.62
KB
-rw-r--r--
cmisc.sl
4.91
KB
-rw-r--r--
cmisc.slc
4
KB
-rw-r--r--
cmode.dfa
7.58
KB
-rw-r--r--
cmode.sl
40.06
KB
-rw-r--r--
cmode.slc
27.9
KB
-rw-r--r--
comments.sl
7.99
KB
-rw-r--r--
comments.slc
5.93
KB
-rw-r--r--
compat.sl
1.39
KB
-rw-r--r--
compile.sl
11.44
KB
-rw-r--r--
compile.slc
5.83
KB
-rw-r--r--
compress.sl
3.12
KB
-rw-r--r--
compress.slc
2.73
KB
-rw-r--r--
cpright.hlp
464
B
-rw-r--r--
ctags.sl
9.53
KB
-rw-r--r--
ctags.slc
7.34
KB
-rw-r--r--
cua.hlp
385
B
-rw-r--r--
cua.sl
7.56
KB
-rw-r--r--
cua.slc
3.91
KB
-rw-r--r--
cuamisc.sl
5.7
KB
-rw-r--r--
cuamisc.slc
1.63
KB
-rw-r--r--
dabbrev.sl
13.77
KB
-rw-r--r--
dabbrev.slc
8.05
KB
-rw-r--r--
dcl.sl
4.68
KB
-rw-r--r--
dcl.slc
4.5
KB
-rw-r--r--
defaults.sl
1.07
KB
-rw-r--r--
digraph.sl
3.8
KB
-rw-r--r--
digraph.slc
1.04
KB
-rw-r--r--
dired.sl
17.78
KB
-rw-r--r--
dired.slc
12.69
KB
-rw-r--r--
docbook.sl
38.33
KB
-rw-r--r--
docbook.slc
38.41
KB
-rw-r--r--
dos437.sl
998
B
-rw-r--r--
dos850.sl
1.3
KB
-rw-r--r--
dos852.sl
1.14
KB
-rw-r--r--
edt.hlp
1.6
KB
-rw-r--r--
edt.sl
14.55
KB
-rw-r--r--
edt.slc
7.93
KB
-rw-r--r--
emacs.hlp
227
B
-rw-r--r--
emacs.sl
6.86
KB
-rw-r--r--
emacs.slc
6.31
KB
-rw-r--r--
emacsmsc.sl
3.52
KB
-rw-r--r--
emacsmsc.slc
3.52
KB
-rw-r--r--
emul.sl
87
B
-rw-r--r--
f90.sl
22.75
KB
-rw-r--r--
f90.slc
18.39
KB
-rw-r--r--
ff90.sl
56
B
-rw-r--r--
ff90.slc
82
B
-rw-r--r--
filter.sl
646
B
-rw-r--r--
filter.slc
562
B
-rw-r--r--
folding.sl
13.47
KB
-rw-r--r--
folding.slc
11.13
KB
-rw-r--r--
fortran.sl
10.65
KB
-rw-r--r--
fortran.slc
7.79
KB
-rw-r--r--
generic.hlp
135
B
-rw-r--r--
gpg.sl
4.89
KB
-rw-r--r--
gpg.slc
4.51
KB
-rw-r--r--
help.sl
15.37
KB
-rw-r--r--
help.slc
12
KB
-rw-r--r--
history.sl
5.73
KB
-rw-r--r--
history.slc
2.2
KB
-rw-r--r--
hooks.sl
1.95
KB
-rw-r--r--
hooks.slc
1.74
KB
-rw-r--r--
html.dfa
6.13
KB
-rw-r--r--
html.sl
13.63
KB
-rw-r--r--
html.slc
10.06
KB
-rw-r--r--
ide.hlp
1.25
KB
-rw-r--r--
ide.sl
22.57
KB
-rw-r--r--
ide.slc
20.07
KB
-rw-r--r--
idl.sl
5.58
KB
-rw-r--r--
idl.slc
5.34
KB
-rw-r--r--
info.sl
19.92
KB
-rw-r--r--
info.slc
17.16
KB
-rw-r--r--
isearch.sl
7.7
KB
-rw-r--r--
isearch.slc
5.01
KB
-rw-r--r--
iso-lat2.sl
963
B
-rw-r--r--
iso-lat2.slc
1010
B
-rw-r--r--
iso-lat3.sl
1.3
KB
-rw-r--r--
iso-lat3.slc
994
B
-rw-r--r--
iso-latin.sl
625
B
-rw-r--r--
iso-latin.slc
420
B
-rw-r--r--
iso2xxx.sl
1.77
KB
-rw-r--r--
iso2xxx.slc
1.39
KB
-rw-r--r--
ispell.sl
2.99
KB
-rw-r--r--
ispell.slc
2.26
KB
-rw-r--r--
javamode.dfa
7.59
KB
-rw-r--r--
javamode.sl
3.24
KB
-rw-r--r--
javamode.slc
3.29
KB
-rw-r--r--
jed.hlp
356
B
-rw-r--r--
jed.rc
9.43
KB
-rw-r--r--
jed.sl
3.57
KB
-rw-r--r--
jed.slc
4.01
KB
-rw-r--r--
jedhelp.sl
1.43
KB
-rw-r--r--
jedhelp.slc
1.49
KB
-rw-r--r--
jedusage.sl
967
B
-rw-r--r--
jedusage.slc
1.08
KB
-rw-r--r--
keycode.sl
4.46
KB
-rw-r--r--
keydefs.sl
9.21
KB
-rw-r--r--
keydefs.slc
6.63
KB
-rw-r--r--
krconv.sl
1.86
KB
-rw-r--r--
krconv.slc
1.45
KB
-rw-r--r--
latex.sl
27.01
KB
-rw-r--r--
latex.slc
20.94
KB
-rw-r--r--
latex209.sl
2.24
KB
-rw-r--r--
latex209.slc
1.57
KB
-rw-r--r--
linux.sl
821
B
-rw-r--r--
lisp.sl
1.21
KB
-rw-r--r--
lisp.slc
1.1
KB
-rw-r--r--
ltx-comp.dat
2.01
KB
-rw-r--r--
ltx-math.sl
4.12
KB
-rw-r--r--
ltx-math.slc
3.95
KB
-rw-r--r--
lua.sl
13.05
KB
-rw-r--r--
macro.sl
2.08
KB
-rw-r--r--
macro.slc
1.95
KB
-rw-r--r--
mail.sl
4.82
KB
-rw-r--r--
mail.slc
4.17
KB
-rw-r--r--
mailalias.sl
6.21
KB
-rw-r--r--
mailalias.slc
3.61
KB
-rw-r--r--
mailedit.sl
10.79
KB
-rw-r--r--
mailutils.sl
3.52
KB
-rw-r--r--
makemode.sl
6.83
KB
-rw-r--r--
man.sl
1.8
KB
-rw-r--r--
man.slc
948
B
-rw-r--r--
maple.sl
2.14
KB
-rw-r--r--
maple.slc
1.91
KB
-rw-r--r--
matlab.sl
5.07
KB
-rw-r--r--
matlab.slc
4.07
KB
-rw-r--r--
menu.sl
4.7
KB
-rw-r--r--
menu.slc
3.91
KB
-rw-r--r--
menus.sl
2.31
KB
-rw-r--r--
menus.slc
1.74
KB
-rw-r--r--
mime.sl
1.98
KB
-rw-r--r--
mime.slc
1.75
KB
-rw-r--r--
mimemisc.sl
684
B
-rw-r--r--
mimemisc.slc
733
B
-rw-r--r--
mini.sl
4.54
KB
-rw-r--r--
mini.slc
3.73
KB
-rw-r--r--
minued.sl
8.99
KB
-rw-r--r--
minued.slc
4.37
KB
-rw-r--r--
misc.sl
4.01
KB
-rw-r--r--
misc.slc
2.51
KB
-rw-r--r--
modehook.sl
3.71
KB
-rw-r--r--
modehook.slc
1.64
KB
-rw-r--r--
modeinfo.sl
1.6
KB
-rw-r--r--
modeinfo.slc
1.48
KB
-rw-r--r--
most.sl
3.64
KB
-rw-r--r--
most.slc
3.13
KB
-rw-r--r--
mouse.sl
5.15
KB
-rw-r--r--
mousex.sl
8.33
KB
-rw-r--r--
mousex.slc
4.36
KB
-rw-r--r--
mswmouse.sl
6.85
KB
-rw-r--r--
mutekeys.sl
3.19
KB
-rw-r--r--
mutekeys.slc
1.49
KB
-rw-r--r--
nroff.sl
1.09
KB
-rw-r--r--
nroff.slc
709
B
-rw-r--r--
occur.sl
1.48
KB
-rw-r--r--
occur.slc
1.03
KB
-rw-r--r--
os.sl
4.22
KB
-rw-r--r--
paste.sl
509
B
-rw-r--r--
paste.slc
485
B
-rw-r--r--
perl.sl
33.63
KB
-rw-r--r--
perl.slc
13.77
KB
-rw-r--r--
perlxtra.sl
13.1
KB
-rw-r--r--
perlxtra.slc
5.18
KB
-rw-r--r--
php.sl
83.23
KB
-rw-r--r--
php.slc
54.16
KB
-rw-r--r--
pipe.sl
567
B
-rw-r--r--
pipe.slc
579
B
-rw-r--r--
popups.sl
9.03
KB
-rw-r--r--
popups.slc
8.88
KB
-rw-r--r--
preparse.sl
1.69
KB
-rw-r--r--
pscript.dfa
21.64
KB
-rw-r--r--
pscript.sl
4.79
KB
-rw-r--r--
pscript.slc
4.3
KB
-rw-r--r--
pushmode.sl
1.84
KB
-rw-r--r--
pushmode.slc
1.55
KB
-rw-r--r--
pymode.sl
17.24
KB
-rw-r--r--
pymode.slc
12.9
KB
-rw-r--r--
python.dfa
6.54
KB
-rw-r--r--
rcs.sl
4.27
KB
-rw-r--r--
rcs.slc
2.86
KB
-rw-r--r--
recent.sl
4.53
KB
-rw-r--r--
recent.slc
2.73
KB
-rw-r--r--
recentx.sl
10.13
KB
-rw-r--r--
recentx.slc
6.38
KB
-rw-r--r--
regexp.sl
1.63
KB
-rw-r--r--
regexp.slc
1.54
KB
-rw-r--r--
register.sl
4.11
KB
-rw-r--r--
register.slc
3.1
KB
-rw-r--r--
replace.sl
1.39
KB
-rw-r--r--
replace.slc
1.09
KB
-rw-r--r--
rmail.sl
38.64
KB
-rw-r--r--
rmail.slc
35.99
KB
-rw-r--r--
rot13.sl
497
B
-rw-r--r--
rot13.slc
379
B
-rw-r--r--
runpgm.sl
690
B
-rw-r--r--
sccs.sl
4.33
KB
-rw-r--r--
sccs.slc
2.54
KB
-rw-r--r--
search.sl
2.5
KB
-rw-r--r--
search.slc
2.29
KB
-rw-r--r--
seldisp.sl
806
B
-rw-r--r--
seldisp.slc
617
B
-rw-r--r--
sendmail.sl
7.02
KB
-rw-r--r--
sendmail.slc
5.73
KB
-rw-r--r--
session.sl
5.91
KB
-rw-r--r--
session.slc
3.46
KB
-rw-r--r--
shell.sl
6.26
KB
-rw-r--r--
shell.slc
3.32
KB
-rw-r--r--
shmode.dfa
1.57
KB
-rw-r--r--
shmode.sl
2.33
KB
-rw-r--r--
shmode.slc
1.91
KB
-rw-r--r--
simple.hlp
407
B
-rw-r--r--
site.sl
76.36
KB
-rw-r--r--
site.slc
36.67
KB
-rw-r--r--
slmode.dfa
3.22
KB
-rw-r--r--
slmode.sl
7.1
KB
-rw-r--r--
slmode.slc
5.79
KB
-rw-r--r--
sort.sl
1.21
KB
-rw-r--r--
sort.slc
1.13
KB
-rw-r--r--
sortmisc.sl
751
B
-rw-r--r--
sortmisc.slc
546
B
-rw-r--r--
spicemod.sl
1.06
KB
-rw-r--r--
spicemod.slc
1.03
KB
-rw-r--r--
srchmisc.sl
3.22
KB
-rw-r--r--
srchmisc.slc
2.56
KB
-rw-r--r--
syncproc.sl
3.58
KB
-rw-r--r--
syncproc.slc
2.36
KB
-rw-r--r--
syntax.sl
3.05
KB
-rw-r--r--
syntax.slc
1.47
KB
-rw-r--r--
tabs.sl
1.39
KB
-rw-r--r--
tabs.slc
1.31
KB
-rw-r--r--
tclmode.dfa
4.69
KB
-rw-r--r--
tclmode.sl
10.41
KB
-rw-r--r--
tclmode.slc
6.11
KB
-rw-r--r--
tex.sl
2.39
KB
-rw-r--r--
tex.slc
779
B
-rw-r--r--
texcom.dfa
1.5
KB
-rw-r--r--
texcom.sl
4.75
KB
-rw-r--r--
texcom.slc
4.12
KB
-rw-r--r--
textmode.sl
2.05
KB
-rw-r--r--
textmode.slc
974
B
-rw-r--r--
tiasm.sl
1.16
KB
-rw-r--r--
tiasm.slc
1.11
KB
-rw-r--r--
tmisc.sl
841
B
-rw-r--r--
tmisc.slc
786
B
-rw-r--r--
tmmode.sl
2.01
KB
-rw-r--r--
tmmode.slc
1.65
KB
-rw-r--r--
tmpfile.sl
2.83
KB
-rw-r--r--
tmpfile.slc
1.56
KB
-rw-r--r--
tpascal.dfa
7.65
KB
-rw-r--r--
tpascal.sl
5.77
KB
-rw-r--r--
tpascal.slc
5.51
KB
-rw-r--r--
untab.sl
1021
B
-rw-r--r--
untab.slc
569
B
-rw-r--r--
util.sl
544
B
-rw-r--r--
util.slc
293
B
-rw-r--r--
verilog.sl
1.49
KB
-rw-r--r--
verilog.slc
1.52
KB
-rw-r--r--
vhdlmode.sl
8.45
KB
-rw-r--r--
vhdlmode.slc
5.6
KB
-rw-r--r--
vmshelp.sl
2.25
KB
-rw-r--r--
win1250.sl
1.29
KB
-rw-r--r--
wmark.sl
4.36
KB
-rw-r--r--
wmark.slc
3.61
KB
-rw-r--r--
wmenu.sl
4.72
KB
-rw-r--r--
wmenu.slc
4.86
KB
-rw-r--r--
wordstar.hlp
909
B
-rw-r--r--
wordstar.sl
15.56
KB
-rw-r--r--
wordstar.slc
13.93
KB
-rw-r--r--
xformreg.sl
1.7
KB
-rw-r--r--
xformreg.slc
1.36
KB
-rw-r--r--
yankpop.sl
2.21
KB
-rw-r--r--
yankpop.slc
2.01
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : dired.sl
% -*- SLang -*- dired.sl % % Simple dired mode for JED. % % % To invoke Dired, do `C-x d' or `M-x dired'. % % Moving around % ============= % % All the usual motion commands plus some extras: % % `C-n' `n' SPC % move point to the next line (at the beginning of the file name) % % `C-p' `p' % move point to the previous line (at the beginning of the file name) % % DEL % move up and unflag % % `^K' % dired_kill_line - removes a line from the dired buffer % (This must be set from the dired hook) % % ============== % % The primary use of Dired is to "flag" files for deletion and then % delete the previously flagged files. % % `d' % Flag this file for deletion. % % `u' % Remove deletion flag on this line. % % `DEL' % Move point to previous line and remove the deletion flag on that % line. % % `~' % Flag all backup files (files whose names end with `~') for deletion % % `g' % Update the entire contents of the Dired buffer % % Deleting Files % ============== % % `x' % expunge all flagged files. Displays a list of all the file names % flagged for deletion, and requests confirmation with `yes'. % After confirmation, all the flagged files are deleted and then % their lines are deleted from the Dired buffer. % % File Manipulations % ================== % % `f' % Visit the file described on the current line, like typing `C-x C-f' % and supplying that file name % % `v' % View the file described on the current line % % `r' % rename - prompts for a new name for the file on the current line % % 'm' % move - move a group of flagged files to an new directory % % `M-x dired_search' % use fsearch with the contents of LAST_SEARCH to perform a search % through the files listed in the dired buffer from the current point % forward. Since it stops in the file where the search string is % encountered, it is structured so that `M-x dired_search' from the % visited file will revert back to the dired buffer and continue the % dired_search from the next file in the list. % require ("glob"); variable Dired_Quick_Help = "d:tag file, u:untag, x:delete tagged files, r:rename, h:more help, ?:this help"; variable Dired_Buffer = "*dired*"; variable Dired_Current_Directory; variable Dired_Move_Target_Dir; ifnot (keymap_p (Dired_Buffer)) make_keymap (Dired_Buffer); definekey ("dired_find", "\r", Dired_Buffer); definekey ("dired_find", "f", Dired_Buffer); definekey ("dired_view", "v", Dired_Buffer); definekey ("dired_tag", "d", Dired_Buffer); definekey (". 1 dired_untag", "u", Dired_Buffer); definekey ("dired_move", "m", Dired_Buffer); definekey ("dired_delete", "x", Dired_Buffer); definekey (". 1 dired_point", "^N", Dired_Buffer); definekey (". 1 dired_point", "n", Dired_Buffer); definekey (". 1 dired_point", " ", Dired_Buffer); definekey (". 1 chs dired_point", "^P", Dired_Buffer); definekey (". 1 chs dired_point", "p", Dired_Buffer); #ifdef UNIX definekey (". 1 chs dired_untag", "^?", Dired_Buffer); % DEL key #elifdef IBMPC_SYSTEM definekey (". 1 chs dired_untag", "\xE0S",Dired_Buffer); % DELETE definekey (". 1 chs dired_untag", "\eOn", Dired_Buffer); % DELETE #endif definekey ("dired_flag_backup", "~", Dired_Buffer); definekey ("dired_rename", "r", Dired_Buffer); definekey ("dired_reread_dir", "g", Dired_Buffer); definekey ("describe_mode", "h", Dired_Buffer); definekey ("dired_quick_help", "?", Dired_Buffer); definekey ("dired_quit", "q", Dired_Buffer); define dired_quit () { delbuf (Dired_Buffer); } private define mode_to_modestring (st) { variable i, mode = st.st_mode, is_types = ["reg", "dir", "lnk", "chr", "fifo", "sock", "blk"], type_codes = ['-', 'd', 'l', 'c', 'p', 's', 'b']; variable mode_string = Char_Type[10]; mode_string[*] = '-'; _for i (0, length(is_types)-1, 1) { ifnot (stat_is (is_types[i], mode)) continue; mode_string[0] = type_codes[i]; break; } if (mode & S_IRUSR) mode_string[1] = 'r'; if (mode & S_IWUSR) mode_string[2] = 'w'; if (mode & S_IXUSR) mode_string[3] = 'x'; #ifexists S_ISUID if (mode & S_ISUID) mode_string[3] = 's'; #endif #ifdef __WIN32__ variable opts = st.st_opt_attrs; if (opts & FILE_ATTRIBUTE_ARCHIVE) mode_string[7] = 'A'; if (opts & FILE_ATTRIBUTE_SYSTEM) mode_string[8] = 'S'; if (opts & FILE_ATTRIBUTE_HIDDEN) mode_string[9] = 'H'; #else if (mode & S_IRGRP) mode_string[4] = 'r'; if (mode & S_IWGRP) mode_string[5] = 'w'; if (mode & S_IXGRP) mode_string[6] = 'x'; # ifexists S_SISGID if (mode & S_ISGID) mode_string[6] = 'g'; # endif if (mode & S_IROTH) mode_string[7] = 'r'; if (mode & S_IWOTH) mode_string[8] = 'w'; if (mode & S_IXOTH) mode_string[9] = 'x'; # ifexists S_ISVTX if (mode & S_ISVTX) mode_string[9] = 't'; # endif #endif return typecast (array_to_bstring (mode_string), String_Type); } private define escape_string (str) { % include > to encode symlink indicator variable badchars = "> \t\n\""; if (str == str_delete_chars (str, badchars)) return str; variable newstr = "\""; badchars = "^" + badchars + "\\"; variable i, i0 = 0, n = strbytelen (str); while (i = strskipbytes (str, badchars, i0), i < n) { variable ch = str[i]; newstr = newstr + str[[i0:i-1]]; newstr = newstr + sprintf ("\\x%02X", ch); i0 = i+1; } newstr = newstr + str[[i0:i-1]] + "\""; return newstr; } private define insert_directory_listing (pat) { variable this_dir; variable st = stat_file (pat); if ((st != NULL) && (stat_is ("dir", st.st_mode))) { this_dir = pat; pat = [path_concat (pat, "*"), path_concat (pat, ".*")]; } else this_dir = path_dirname (pat); variable file, files = glob (pat); variable i, n = length (files); variable stats = Struct_Type[n]; variable sizes = UInt64_Type[n]; files = files[array_sort (files)]; _for i (0, n-1, 1) { file = files[i]; st = lstat_file (file); if (st == NULL) continue; stats[i] = st; sizes[i] = st.st_size; } variable max_size = 0; if (length (sizes)) max_size = max(sizes); variable numdigits = 0; do { max_size /= 10; numdigits++; } while (max_size); variable fmt = " %10s %6S %6S " + sprintf ("%%%dS ", numdigits) + "%s %s%s\n"; variable mode_string = NULL, mode = NULL; variable six_months = _time () - 3600*24*30*6; _for i (0, n-1, 1) { st = stats[i]; if (st == NULL) continue; if (mode != st.st_mode) { mode = st.st_mode; mode_string = mode_to_modestring (st); } variable mtime, tm; mtime = st.st_mtime; tm = localtime (mtime); if (tm == NULL) mtime = "Jan 01 1980"; % Windows else { if (mtime < six_months) mtime = strftime ("%b %d %Y", tm); else mtime = strftime ("%b %d %H:%M", tm); } variable symlink = ""; file = files[i]; #ifexists readlink if (stat_is ("lnk", mode)) { symlink = readlink (path_concat (this_dir, file)); if (symlink == NULL) symlink = "??"; symlink = " -> " + escape_string (symlink); } #endif file = escape_string (path_basename (file)); vinsert (fmt, mode_string, st.st_uid, st.st_gid, st.st_size, mtime, file, symlink); } } define dired_read_dir (dir) { variable file, flags; #ifdef IBMPC_SYSTEM dir = expand_filename (dir); # ifdef MSDOS MSWINDOWS dir = msdos_fixup_dirspec (dir); # endif #endif variable want_dir; if ( file_status (dir) == 2 ) { (want_dir,) = parse_filename (dircat (dir, Dired_Buffer)); #ifdef VMS dir = Dired_Current_Directory; #endif } else { (want_dir,dir) = parse_filename (dir); } if ( change_default_dir (want_dir)) error ("Failed to chdir."); Dired_Current_Directory = want_dir; sw2buf (Dired_Buffer); (file,,,flags) = getbuf_info (); setbuf_info (file, Dired_Current_Directory, Dired_Buffer, flags); set_status_line (" DIRED: %b (%m%n) (%p) | press '?' for help.", 0); set_readonly (0); erase_buffer (); use_keymap (Dired_Buffer); set_mode ("dired", 0); insert_directory_listing (dir); bob (); insert ("== "); insert (Dired_Current_Directory); newline (); set_buffer_modified_flag (0); set_readonly(1); flush (""); } define dired_quick_help () { message (Dired_Quick_Help); } define dired_reread_dir () { dired_read_dir (Dired_Current_Directory); } % set the point at the start of the file name define dired_point (dirn) { if (dirn > 0) go_down_1 (); else if (dirn < 0) go_up_1 (); bol_skip_white (); if (looking_at_char ('l')) { () = ffind ("->"); bskip_white (); } else eol (); bskip_chars ("^ \n"); } #ifndef VMS define dired_kill_line () { bol (); if ( bobp () ) return; % do not remove top line set_readonly (0); push_mark (); go_down_1 (); del_region (); set_buffer_modified_flag (0); set_readonly (1); dired_point (0); } #endif private define extract_filename_at_point () { push_spot (); push_mark (); if (looking_at_char ('"')) { go_right (1); if (ffind_char ('"')) go_right (1); } else skip_chars ("^ \t\n"); variable name = strtrim (bufsubstr ()); pop_spot (); if (name[0] == '"') { try { name = eval (name); } catch AnyError: name = ""; } return name; } % (name, type) = dired_getfile () % % name = name of file or directory % % type = 0 : nothing % type = 1 : file % type = 2 : directory % type = 3 : link define dired_getfile () { variable name, type, ext, stat_buf; bol (); if (bobp ()) return ("", 0); go_right(2); % skip possible D tag type = 1; if (looking_at_char ('d')) type = 2; else if (looking_at_char ('l')) type = 3; dired_point (0); name = extract_filename_at_point (); if (type == 3) { % symbolic link stat_buf = stat_file (name); if (stat_buf != NULL) { if (stat_is ("dir", stat_buf.st_mode)) type = 2; else if (stat_is ("reg", stat_buf.st_mode)) type = 1; } } return (name, type); } define dired_tag () { variable type; EXIT_BLOCK { dired_point (1); } (, type) = dired_getfile (); if ( type != 1 ) return; % only files! set_readonly (0); bol (); insert_char ('D'); del (); set_buffer_modified_flag (0); set_readonly (1); } define dired_untag (dirn) { if ( dirn < 0 ) { ifnot ( up_1 () ) error ("Top of Buffer."); } bol (); if ( looking_at_char ('D') ) { set_readonly (0); insert_char (32); del (); set_buffer_modified_flag (0); set_readonly (1); } if ( dirn > 0 ) dired_point (1); } % perform operation on tagged files--- 4 parameters define dired_xop_tagged_files (prompt, msg, op_function) { variable lbuf = " *Deletions*"; variable stack, n, fails = Null_String; variable file; setbuf (Dired_Buffer); push_spot_bob (); stack = _stkdepth; % save stack depth ERROR_BLOCK { _pop_n ( _stkdepth - stack ); sw2buf (Dired_Buffer); set_readonly (0); bob (); while ( bol_fsearch_char ('%') ) { insert_char ('D'); del (); } pop_spot (); set_buffer_modified_flag (0); set_readonly (1); } set_readonly (0); while ( bol_fsearch_char ('D') ) { insert_char ('%'); del (); dired_getfile (); pop (); % pop type, leave name on stack } n = _stkdepth - stack; ifnot (n) error ("No tags!"); sw2buf (lbuf); erase_buffer (); loop (n) { insert (); % tagged files on stack newline (); } bob (); buffer_format_in_columns (); if ( get_yes_no (prompt) == 1) { sw2buf (Dired_Buffer); bob (); while ( bol_fsearch_char ('%') ) { (file,) = dired_getfile (); bol (); push_spot (); file = dircat (Dired_Current_Directory, file); if (@op_function (file) ) { pop_spot (); flush (msg + file); push_mark (); go_down_1 (); del_region (); go_left_1 (); } else { pop_spot (); fails += " " + file; insert_char (32); del (); } } } EXECUTE_ERROR_BLOCK; if ( strlen (fails) ) message ("Operation Failed:" + fails); } define dired_delete () { dired_xop_tagged_files ("Delete these files", "Deleted ", &delete_file); } define dired_do_move (file) { variable name; (name,) = dired_getfile (); name = dircat (Dired_Move_Target_Dir, name); not (rename_file (file, name)); } define dired_move () { Dired_Move_Target_Dir = read_file_from_mini ("Move to dir"); if ( file_status (Dired_Move_Target_Dir) != 2 ) error ("Expecting directory name"); "Move these to " + Dired_Move_Target_Dir; dired_xop_tagged_files ((), "Moved ", &dired_do_move); } #ifndef VMS define dired_flag_backup () { variable name, type; push_spot_bob (); set_readonly (0); while ( fsearch_char ( '~' ) ) { (name, type) = dired_getfile (); if ( (type == 1) and (string_match (name, "~", strlen(name))) ) { bol (); insert_char ('D'); del (); % is a backup file } eol (); } pop_spot (); set_buffer_modified_flag (0); set_readonly (1); } #endif define dired_rename () { variable oldf, type, len, f, n, nf, nd, od, status; (oldf, type) = dired_getfile (); ifnot ( type ) return; sprintf ("Rename %s to", oldf); n = read_file_from_mini (()); % % If new name is a dir, move it to the dir with oldname. % If file is not a directory and exists, signal error. % status = file_status (n); if ( status == 1 ) error ("File exists. Not renamed."); else if ( status == 2 ) n = dircat (n, oldf); % % Check to see if rename to new directory % (nd,nf) = parse_filename (n); f = dircat (Dired_Current_Directory, oldf); (od,) = parse_filename (f); if ( rename_file (f, n) ) error ("Operation Failed!"); set_readonly (0); #ifdef UNIX if (od != nd) #elifdef VMS IBMPC_SYSTEM if (strup (od) != strup (nd)) #endif { delete_line (); dired_point (0); } else { dired_point (0); push_mark (); skip_chars ("^ \t\n"); del_region (); insert (escape_string (nf)); dired_point (1); } set_buffer_modified_flag (0); set_readonly (1); } %!%+ %\function{dired} %\synopsis{dired} %\description % Mode designed for maintaining and editing a directory. % % To invoke Dired, do \var{M-x dired} or \var{C-x d} (emacs) % % Dired will prompt for a directory name and get a listing of files in the % requested directory. % % The primary use of Dired is to "flag" files for deletion and then delete % the previously flagged files. % % \var{d} Flag this file for deletion. % \var{u} Remove deletion flag on this line. % DEL Move point to previous line and remove deletion flag. % \var{~} Flag all backup files for deletion. % % \var{x} eXpunge all flagged files. Dired will show a list of the % files tagged for deletion and ask for confirmation before actually % deleting the files. % % \var{r} Rename file on the current line; prompts for a newname % \var{m} Move tagged files to a new dir; prompts for dir name % % \var{g} Update the entire contents of the Dired buffer % % \var{f} Visit the file described on the current line, like typing % \var{M-x find_file} and supplying that file name. If current line is a % directory, runs dired on the directory and the old buffer is killed. % % \var{v} View the file described on the current line in MOST mode. % % \var{q} Quit dired mode. % % \var{M-x dired_search} % use fsearch to perform a search through the files listed in the % dired buffer from the current point forward. \var{M-x dired_search} % from the visited file will revert to the dired buffer and continue % the search from the next file in the list. % % all the usual motion commands plus some extras: % % \var{C-n} \var{n} SPC % move point to the next line (at the beginning of the file name) % % \var{C-p} \var{p} % move point to the previous line (at the beginning of the file name) % % \var{M-x dired_kill_line} \var{^K} (emacs) % removes a line from the dired buffer %!%- define dired () { variable dir; if (_NARGS == 1) dir = (); else dir = read_file_from_mini ("Directory:"); dired_read_dir (dir); dired_quick_help (); run_mode_hooks ("dired_hook"); } define dired_find () { variable name, type; (name, type) = dired_getfile (); name = dircat (Dired_Current_Directory, name); if ( type == 1 ) { ifnot ( read_file (name) ) error ("Unable to read file."); pop2buf (whatbuf ()); } else if ( type == 2 ) { dired_read_dir (name); } } define dired_view () { variable name, type; (name, type) = dired_getfile (); name = dircat (Dired_Current_Directory, name); if ( type == 1 ) { ifnot ( read_file (name) ) error ("Unable to read file."); pop2buf (whatbuf ()); most_mode (); } } #ifndef VMS define dired_search_files () { go_right_1 (); % start after this one if ( fsearch (LAST_SEARCH) ) return (1); % found - stop search if ( buffer_modified () ) error ("buffer has been modified"); delbuf (whatbuf ()); pop2buf (Dired_Buffer); return 0; } define dired_search () { variable str, name, type; ifnot ( bufferp (Dired_Buffer) ) error ( "*dired* not available."); if ( strcmp (Dired_Buffer, whatbuf () ) ) % continue last search { ifnot ( strlen (LAST_SEARCH) ) error ("No specified search string"); if ( dired_search_files () ) return; go_down_1 (); % do the next file! } else { str = read_mini ("dired_search:", Null_String, LAST_SEARCH); ifnot ( strlen (str) ) error ("Specify search string"); save_search_string (str); } do { (name, type) = dired_getfile (); if ( type == 1 ) % only search files { name = dircat (Dired_Current_Directory, name); ifnot ( read_file (name) ) error ("Unable to read file."); if ( dired_search_files () ) { pop2buf (whatbuf ()); return; } } } while ( down_1 () ); } #endif
Close