혼자말이 위치할 디렉토리는 ~/.gnome2/nautilus-scripts 이며...
여기에 다음의 두파일 을 만든 후 노틸러스를 재시작 하면 됩니다.
$gedit ~/.gnome2/nautilus-scripts/복사
Code:
#! /bin/bash
location=`zenity --file-selection --directory --title="Select a directory"`
for arg
do
if [ -e "$location/$arg" ]; then
zenity --question --title="Conflict While Copying" --text="File $location/$arg already exists. Would you like to replace it?"
if [ "$?" = 1 ]; then
exit 1
fi
fi
cp -R "$arg" "$location" &
ORIG_SIZE=`du -bs "$arg"|awk '{print $1}'`
CP_SIZE=`du -bs "$location/$arg"|awk '{print $1}'`
(
while [ $CP_SIZE -ne $ORIG_SIZE ]; do
expr `expr $CP_SIZE \* 100` / $ORIG_SIZE
CP_SIZE=`du -bs "$location/$arg"|awk '{print $1}'`
done
echo 100
)| zenity --progress --auto-close --text "Copying \"$arg\"..."
done
$gedit ~/.gnome2/nautilus-scripts/이동
Code:
#! /bin/bash
location=`zenity --file-selection --directory --title="Select a directory"`
for arg
do
if [ -e $location/$arg ];then
zenity --question --title="Conflict While Moving" --text="File "$location/$arg" already exists. Would you like to replace it?"
case "$?" in
1 ) exit 1 ;;
0 ) mv $arg $location ;;
esac
else
mv $arg $location
fi
done
노틸러스를 재시작 $ killall nautilus







