Reply to this topicStart new topicStart Poll

> How To Copy Xmail Domain Directory Structure
sergiut2002
  Posted: Jan 26 2010, 03:15 PM
Quote Post


Junior Member
**

Group: Members
Posts: 29
Member No.: 3111
Joined: 22-December 08



This command will copy directory structure without any file:
QUOTE

root@trat:~# cd /new/dir
root@trat:~# (cd /old/dir; find -type d ! -name .) | xargs mkdir

/new/dir - path to new directory where all old directories will be copied
/old/dir - path to old domain mail directory structure

This command will copy directory structure excluding files specified with --exclude switch:
QUOTE

root@trat:~# tar -c --exclude=*.tab sourceDir | tar -x -C destDir


--exclude=*.tab - will exclude all files that have .tab extension
sourceDir - path to old domain directory
destDir - path where all directories will be copied

Posted this commands in case someone wants to move to a new server and wants his old directory structure copied without mails.

hope it helps.wacko.gif
PMEmail PosterYahoo
Top
sergiut2002
Posted: Feb 10 2010, 09:29 AM
Quote Post


Junior Member
**

Group: Members
Posts: 29
Member No.: 3111
Joined: 22-December 08



QUOTE
find . -name '*.trat' | xargs -n 1 rm


this command will delete all files with .trat extension.
PMEmail PosterYahoo
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | XMail Server | Next Newest »

Reply to this topicStart new topicStart Poll