LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2007, 01:19 AM   #1
ehegagoka
Member
 
Registered: Jun 2005
Distribution: Slackware
Posts: 68

Rep: Reputation: 15
Re-create directory structure


hi!,
I'm trying to copy/recreate the directory structure but not including it's contents I'm trying this, but it's getting an error because of the '.' how can I remove it?

Code:
newton@gollum:~/tuaman> find -type d  -exec mkdir /apps/tuaman2/\{\} \;         mkdir: cannot create directory `/apps/tuaman2/.': No such file or directory
mkdir: cannot create directory `/apps/tuaman2/./dir1': No such file or directory
mkdir: cannot create directory `/apps/tuaman2/./dir1/dir3': No such file or directory
mkdir: cannot create directory `/apps/tuaman2/./dir2': No such file or directory
newton@gollum:~/tuaman> find -type d
I do have /apps/tuaman2/, I guess the '.' is causing the error.
Thanks!

Regards,
Rhani
 
Old 02-16-2007, 03:40 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Code:
cd /apps/tuaman2
find /apps/tuaman -type d -printf "%P\n" | xargs mkdir -p

That's one solution among others.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg 6.8.2 -> xorgcfg: can't create rules structure JZL240I-U Linux - Software 0 01-09-2006 08:24 AM
xorgconf: can't create rules structure JZL240I-U Linux - Software 2 01-06-2006 02:17 AM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 06:05 AM
directory structure alaios Linux From Scratch 4 04-20-2004 06:16 PM
directory structure sluggo Linux - Newbie 1 01-20-2002 08:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration