mc in main
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
|
||||
[Midnight-Commander]
|
||||
show_backups=1
|
||||
show_dot_files=1
|
||||
verbose=1
|
||||
mark_moves_down=1
|
||||
pause_after_run=0
|
||||
shell_patterns=1
|
||||
auto_save_setup=1
|
||||
auto_menu=0
|
||||
use_internal_view=1
|
||||
use_internal_edit=1
|
||||
clear_before_exec=1
|
||||
mix_all_files=0
|
||||
fast_reload=0
|
||||
fast_reload_msg_shown=0
|
||||
confirm_delete=1
|
||||
confirm_overwrite=1
|
||||
confirm_execute=0
|
||||
confirm_exit=0
|
||||
confirm_directory_hotlist_delete=1
|
||||
safe_delete=0
|
||||
mouse_repeat_rate=100
|
||||
double_click_speed=250
|
||||
use_8th_bit_as_meta=0
|
||||
confirm_view_dir=0
|
||||
mouse_move_pages=1
|
||||
mouse_move_pages_viewer=1
|
||||
fast_refresh=0
|
||||
navigate_with_arrows=1
|
||||
drop_menus=1
|
||||
wrap_mode=1
|
||||
old_esc_mode=0
|
||||
cd_symlinks=1
|
||||
show_all_if_ambiguous=0
|
||||
max_dirt_limit=10
|
||||
torben_fj_mode=0
|
||||
use_file_to_guess_type=1
|
||||
alternate_plus_minus=0
|
||||
only_leading_plus_minus=1
|
||||
show_output_starts_shell=0
|
||||
panel_scroll_pages=1
|
||||
xtree_mode=0
|
||||
num_history_items_recorded=60
|
||||
file_op_compute_totals=1
|
||||
vfs_timeout=60
|
||||
ftpfs_directory_timeout=900
|
||||
use_netrc=1
|
||||
ftpfs_retry_seconds=30
|
||||
ftpfs_always_use_proxy=0
|
||||
ftpfs_use_passive_connections=1
|
||||
ftpfs_use_unix_list_options=1
|
||||
ftpfs_first_cd_then_ls=0
|
||||
editor_word_wrap_line_length=72
|
||||
editor_key_emulation=0
|
||||
editor_tab_spacing=8
|
||||
editor_fill_tabs_with_spaces=0
|
||||
editor_return_does_auto_indent=1
|
||||
editor_backspace_through_tabs=0
|
||||
editor_fake_half_tabs=0
|
||||
editor_option_save_mode=0
|
||||
editor_option_save_position=1
|
||||
editor_option_auto_para_formatting=0
|
||||
editor_option_typewriter_wrap=0
|
||||
editor_edit_confirm_save=1
|
||||
editor_syntax_highlighting=1
|
||||
editor_visible_tabs=1
|
||||
editor_visible_spaces=1
|
||||
nice_rotating_dash=1
|
||||
horizontal_split=0
|
||||
mcview_remember_file_position=0
|
||||
editor_backup_extension=~
|
||||
editor_highlight=3
|
||||
|
||||
[Layout]
|
||||
equal_split=1
|
||||
message_visible=0
|
||||
keybar_visible=1
|
||||
xterm_title=1
|
||||
output_lines=0
|
||||
command_prompt=1
|
||||
menubar_visible=1
|
||||
show_mini_info=1
|
||||
permission_mode=0
|
||||
filetype_mode=1
|
||||
free_space=1
|
||||
|
||||
[Misc]
|
||||
ftpfs_password=anonymous@
|
||||
ftp_proxy_host=gate
|
||||
display_codepage=Other_8_bit
|
||||
ftp_codepage=Other_8_bit
|
||||
|
||||
[New Left Panel]
|
||||
display=listing
|
||||
reverse=0
|
||||
case_sensitive=1
|
||||
sort_order=name
|
||||
list_mode=full
|
||||
user_format=half type name | size | perm
|
||||
user_status0=half type name | size | perm
|
||||
user_status1=half type name | size | perm
|
||||
user_status2=half type name | size | perm
|
||||
user_status3=half type name | size | perm
|
||||
user_mini_status=0
|
||||
panel_display_codepage=Other_8_bit
|
||||
|
||||
[New Right Panel]
|
||||
display=listing
|
||||
reverse=0
|
||||
case_sensitive=1
|
||||
sort_order=name
|
||||
list_mode=full
|
||||
user_format=half type name | size | perm
|
||||
user_status0=half type name | size | perm
|
||||
user_status1=half type name | size | perm
|
||||
user_status2=half type name | size | perm
|
||||
user_status3=half type name | size | perm
|
||||
user_mini_status=0
|
||||
panel_display_codepage=Other_8_bit
|
||||
|
||||
[Panelize]
|
||||
SUID ve SGID uygulamaları bul=find . \( \( -perm -04000 -a -perm +011 \) -o \( -perm -02000 -a -perm +01 \) \) -print
|
||||
Yamadan sonraki .orig dosyalarını bul=find . -name \*.orig -print
|
||||
Yamadan sonraki reddedilenleri bul=find . -name \*.rej -print
|
||||
@@ -0,0 +1,14 @@
|
||||
# A little fix so mc exits into it's current working directory
|
||||
export MC_ENV=/usr/share/mc/bin/mc.sh
|
||||
|
||||
for i in $MC_ENV; do
|
||||
if [ -x $i ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
|
||||
# include this, so also xterm,kterm,gterm,etc will have default bash settings
|
||||
|
||||
#if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
|
||||
# . /etc/profile
|
||||
#fi
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,157 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# u7z - 7zip file archive Virtual File System for Midnight Commander ( ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/ )
|
||||
#
|
||||
# Copyright (C) 2004 Sergiy Niskorodov (sgh at ukrpost dot net)
|
||||
|
||||
# Written by Sergiy Niskorodov aka SGh
|
||||
#
|
||||
# beta version 4.16 (11 Apr 2005)
|
||||
#
|
||||
# 7z for linux can be found on http://sourceforge.net/projects/p7zip/
|
||||
|
||||
|
||||
# Thanks to urar VFS authors andrey joukov 2:5020/337.13@fidonet.org,
|
||||
# christian.gennerat@alcatel.fr, Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
# I use this script like example
|
||||
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
SEVENZ=`which 7za`
|
||||
|
||||
|
||||
mc7zfs_list ()
|
||||
{
|
||||
$SEVENZ l "$1" 2> /dev/null | gawk -v uid=${UID-0} '
|
||||
BEGIN { flag=0; arr_of_month="JanFebMarAprMayJunJulAugSepOctNovDec" }
|
||||
/^-------/ { flag++; if (flag > 1) exit 0; next }
|
||||
{
|
||||
if (flag == 0) next
|
||||
|
||||
year=substr($1, 1, 4)
|
||||
month=substr($1, 6, 2)
|
||||
day=substr($1, 9, 2)
|
||||
|
||||
month_name=substr(arr_of_month, (month-1)*3+1, 3)
|
||||
|
||||
time=substr($2, 1, 5)
|
||||
|
||||
if (index($3, "D") != 0)
|
||||
attr="drwxr-xr-x"
|
||||
else
|
||||
if (index($3, ".") != 0)
|
||||
attr="-rw-r--r--"
|
||||
|
||||
size=$4
|
||||
|
||||
$0=substr($0, 54)
|
||||
if (NF > 1)
|
||||
name=$0
|
||||
else
|
||||
name=$1
|
||||
|
||||
gsub(/\\/, "/", name)
|
||||
|
||||
printf "%s 1 %-8d %-8d %8d %3s %2d %4d %s %s\n", attr, uid, 0, size, month_name, day, year, time, name
|
||||
}'
|
||||
}
|
||||
|
||||
mc7zfs_copyin ()
|
||||
{
|
||||
# preserve pwd.
|
||||
pwd=`pwd`
|
||||
# Create a directory and copy in it the tmp file with the random name
|
||||
dir="$3".dir
|
||||
mkdir "$dir"
|
||||
cd "$dir"
|
||||
mv "$1" .
|
||||
arname=`basename "$1"`
|
||||
di="${2%/*}"
|
||||
# if file is to be written upper in the archive tree, make fake dir
|
||||
if test "$di" != "${2##*/}" ; then
|
||||
# echo asdsad 1>&2
|
||||
mkdir -p "$di"
|
||||
fi
|
||||
# pwd > /tmp/cdir
|
||||
# echo "$arname $2" > /tmp/ters
|
||||
cp -fp "$3" "$dir/$2"
|
||||
# cp -f "$1" "$3.dir"
|
||||
$SEVENZ a "$arname" "$2" -w >/dev/null 2> /dev/null
|
||||
mv "$arname" "$1"
|
||||
cd $pwd
|
||||
rm -rf "$3.dir"
|
||||
}
|
||||
|
||||
mc7zfs_copyout ()
|
||||
{
|
||||
dir=tmpdir.${RANDOM}
|
||||
mkdir /tmp/"$dir"
|
||||
# echo "$1 $2 $3" > hers
|
||||
# p7zip 0.91 don't understand filename in subdir without "./"
|
||||
# but in top dir it understand only without "./"
|
||||
FLIST=`$SEVENZ l "$1" 2> /dev/null`
|
||||
echo "$FLIST" | grep -q "[.][/]" &> /dev/null && EXFNAME=*./"$2" || EXFNAME="$2"
|
||||
EXFN=`basename "$2"`
|
||||
$SEVENZ e -r- "$1" "$EXFNAME" -o/tmp/"$dir" > /dev/null 2> /dev/null
|
||||
|
||||
cat /tmp/"$dir"/"$EXFN" > "$3"
|
||||
rm -rf /tmp/"$dir"
|
||||
}
|
||||
|
||||
mc7zfs_mkdir ()
|
||||
{
|
||||
# Function not fully implemented, because 7z cannot keep empty directories
|
||||
# preserve pwd.
|
||||
pwd=`pwd`
|
||||
# Create a directory and create in it a tmp directory with the good name
|
||||
dir=tmpdir.${RANDOM}
|
||||
mkdir $dir
|
||||
cd $dir
|
||||
mv "$1" .
|
||||
arname=`basename "$1"`
|
||||
mkdir -p "$2"
|
||||
# 7z cannot create an empty directory
|
||||
# touch "$2"/.emptydir
|
||||
$SEVENZ a -r "$arname" "$2" >/dev/null 2>/dev/null
|
||||
# echo "$1" "$2" >error34
|
||||
# $SEVENZ d ../"$1" "$2/.7zfs" >/dev/null
|
||||
mv "$arname" "$1"
|
||||
cd $pwd
|
||||
rm -rf $dir
|
||||
}
|
||||
|
||||
mc7zfs_rm ()
|
||||
{
|
||||
$SEVENZ l "$1" 2> /dev/null | grep -q "[.][/]" &> /dev/null && EXFNAME=*./"$2" || EXFNAME="$2"
|
||||
$SEVENZ d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && { echo -e "Function not implemented...\n7z cannot delete files from solid archive." >&2 ; exit 1 ; }
|
||||
}
|
||||
|
||||
umask 077
|
||||
|
||||
cmd="$1"
|
||||
shift
|
||||
|
||||
case "$cmd" in
|
||||
list) mc7zfs_list "$@" ;;
|
||||
rm) mc7zfs_rm "$@" ;;
|
||||
rmdir) mc7zfs_rm "$@" ;;
|
||||
mkdir) mc7zfs_mkdir "$@" ;;
|
||||
copyin) mc7zfs_copyin "$@" ;;
|
||||
copyout) mc7zfs_copyout "$@" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
exit 0
|
||||
Reference in New Issue
Block a user