nautilus script 사용하기

azirael의 이미지

한 때 nautilus가 무겁고 느리다고 구박받던 시절이 있었다.
그래도 개인적으로는 나름대로 출중한 외모가 마음에 들어서,
xfce를 쓰면서도 nautilus는 함께 썼던 기억이 있다.
그런데 언제부터인가 script를 함께 쓸 수 있게 된 것이 아니던가.
나만 몰랐을 수도 있다.
충분히 그럴만 한데다, 앞으로 또 잊어먹지 않을까 싶어서, 메모겸 적어 본다.
아.. 그런데 가만 생각해보니 언젠가 changelog에서 이 기능을 본 적이 있다.
다만 changelog가 늘 그렇듯 어떻게 쓰는지 상세히 밝히지는 않았었다.
덕분에 그냥 늘 터미널 열고 썼었던 것이 아닌가.
방법은 무척 간단하다.
먼저 ~/.gnome2/nautilus-scripts 디렉토리를 만든다.
그 후, 아래의 예와 같은 스크립트 파일을 만든다.

#!/bin/bash
#
# File Name Encoding Conversion Script
#
# Use this script to convert file names with special characters
# between Windows-1252 and UTF-8 encoded file systems.
# The script can be easily modified to convert between any 
# encoding to any other encoding.
#
# This script is similar to a script already available for the
# KDE desktop.
#
# changeFilenameCode
# <a href="http://kubuntu.free.fr/servicemenu/
#
#" rel="nofollow">http://kubuntu.free.fr/servicemenu/
#
#</a> Original post:
# <a href="http://moto.debian.org.tw/viewtopic.php?t=5367
#
#" rel="nofollow">http://moto.debian.org.tw/viewtopic.php?t=5367
#
#</a> Contributor:
# Adam Kane
# <a href="mailto:kane.adam@gmail.com" rel="nofollow">kane.adam@gmail.com</a>
#
# The script has been modified to manage more than one 
# file and to specifically convert from windows-1252 to utf-8.
#
# Dependencies : convmv
# <a href="http://j3e.de/linux/convmv/
 
if" rel="nofollow">http://j3e.de/linux/convmv/
 
if</a> [ $# -gt 0 ];then
convmv -f cp949 -t utf-8 -r --notest "$@"| zenity --progress --pulsate --text="conversion in progress" --auto-close
fi
exit 0 

이 스크립트를 적당한 이름을 붙여서 새로 만든 디렉토리로 옮겨준다.
물론 실행권한을 주어야 할 것이다.
그리고 cp949형식을 가진 덕분에 깨진 이름으로 보이는 파일에 마우스를 갖다대고,
우측버튼을 클릭하면 아래와 같은 script 메뉴가 나타날 것이다.

적당히 아래와 같이 선택한다.

아래의 그림은 결과물을 보여준다.
위의 script는 어디선가 CnP 해온 것인데, 훌륭하게 작동한다.
심지어 여러 파일을 동시에 처리해주는 것도 가능하다.

File attachments: 
첨부파일 크기
Image icon nautilus_action1.png404.71 KB
Image icon nautilus_action2.png431.3 KB
Image icon nautilus_action3.png425.12 KB

댓글

hey의 이미지

훈늉합니다 !

May the F/OSS be with you..



----------------------------
May the F/OSS be with you..


keizie의 이미지

적용 조건을 정할 수도 있고, 쓸만합니다.

스크립트는 빠진 기능인 줄 알았는데 아직 들어있나보군요.

DebPolaris의 이미지

저는 왜 안되는 걸까요??

남이 가르쳐주는 것만 받아들이는 것이 아니라, 스스로 만들고, 고쳐가는 사람을 '해커'라고 부른다.
그리고 자신이 쌓아온 노하우를 거리낌없이 나눌 줄 아는 사람을 '진정한' 해커라고 한다.
-Rob Flickenger 'Linux server hacks'
http://heunoni.tistory.com/

-----------------------------------------------------
남이 가르쳐주는 것만 받아들이는 것이 아니라, 스스로 만들고, 고쳐가는 사람을 '해커'라고 부른다.
그리고 자신이 쌓아온 노하우를 거리낌없이 나눌 줄 아는 사람을 '진정한' 해커라고 한다.
-Rob Flickenger 'Linux server hacks'

DEBIAN TESTING, KDE...
debpolaris.blogspot.kr

DebPolaris의 이미지

이상하게 바탕화면에서 직접 했을 때는 안되더군요... 왜 그런지 어째든 감사합니다...

남이 가르쳐주는 것만 받아들이는 것이 아니라, 스스로 만들고, 고쳐가는 사람을 '해커'라고 부른다.
그리고 자신이 쌓아온 노하우를 거리낌없이 나눌 줄 아는 사람을 '진정한' 해커라고 한다.
-Rob Flickenger 'Linux server hacks'
http://heunoni.tistory.com/

-----------------------------------------------------
남이 가르쳐주는 것만 받아들이는 것이 아니라, 스스로 만들고, 고쳐가는 사람을 '해커'라고 부른다.
그리고 자신이 쌓아온 노하우를 거리낌없이 나눌 줄 아는 사람을 '진정한' 해커라고 한다.
-Rob Flickenger 'Linux server hacks'

DEBIAN TESTING, KDE...
debpolaris.blogspot.kr

azirael의 이미지

제가 적고도 잊어먹었던 글이 어느 순간엔가 다시 올라온 덕분에
어떻게 구하게 된 euc-kr로 코딩된 이름의 수많은 파일들을
터미널에서 convmv를 사용하지 않고 그냥 nautilus에서 널널하게 변환할 수 있었습니다. :)

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.