Search Results

Search: Posts Made By: me2
8,511
Posted By Corona688
mkdir -p /boo /boo/dir1 /boo/dir2 /doo/dir1...
mkdir -p /boo /boo/dir1 /boo/dir2 /doo/dir1 /doo/dir2 /foo /foo/dir1 /foo/dir2
touch /boo/boo_file /boo/dir1/file1 /boo/dir2/file1 /doo/dir1/file1 /doo/dir2/file1 /doo/doo_file /foo/dir1/file1...
8,511
Posted By frans
No need to mkdir -p /foo if you already mkdir -p...
No need to mkdir -p /foo if you already mkdir -p /foo/dir1 as the -p option creates parents.

#!/bin/bash
for d1 in boo doo foo; do
for d2 in dir1 dir2; do
mkdir -p /$d1/$d2
...
8,511
Posted By Corona688
-p is required, yes, or I wouldn't have put it...
-p is required, yes, or I wouldn't have put it there.

if you already have a file named 'boo', it will fail. delete it.
8,511
Posted By Aia
It fails because you are trying to create those...
It fails because you are trying to create those in `/' and you are not root.
Remove the `/' in front of directories in the script
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy