The location of config file of Menu and Panel of Xubuntu

In the process of remastering customized Xubuntu, I spent lots of time to identify the location of config file of Menu and Panel of Xubuntu. Usually files should be located to /etc/skel, but xfce seems to have different policies.

The menu settings is stored in

~/.config/menus/xfce-applications.menu

and the panel settings is stored in

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

And the system-wide settings are stored in the locations below.

/etc/xdg/xdg-xubuntu/menus/xfce-applications.menu (menu)
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml (panel)
/etc/xdg/xfce4/panel/* (panel)

You also need to copy some files in home directory to /etc/skel.

So if you want to reflect your personal customization in system-wide setting, you need to type the following from the terminal.

sudo cp ~/.config/menus/xfce-applications.menu /etc/xdg/xdg-xubuntu/menus/
sudo cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml \
  /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
sudo cp -r ~/.config/xfce4/panel /etc/xdg/xfce4/
sudo cp -a .config .gconf .gnome2 .local .bashrc /etc/skel
sudo cp -a ./Desktop /etc/skel/
cd /etc/skel
sudo chown -R root:root .config .gconf .gnome2 .local .bashrc Desktop

Linuxでのファイル・ディレクトリ名一括置換

ときどきファイル名やディレクトリ名を一括で置換したいことがあります。

私の場合、こんなことがありました。

あるデータがこんなディレクトリに入ってきました。

120903
120904
120910

120929

しかし、私の管理方法では、

20120903
20120904
20120910

20120929

としたいわけです。

端末から簡単に打てるコマンドがないかと探したところ、

その名も rename というコマンドがありました。

rename 's/検索文字列/置換文字列/' ファイル・ディレクトリ名(ワイルドカード可)

となるようです。

私の場合

$ rename 's/^12/2012/' *

で目的を達成することができました。
備忘録として残しておきます。