Create Oracle Directories for as-is database creation.
On several situations we need to mimick database to lab environments. And to create directories as-is of the source database; found this cool query that can generate all related directory structure creation linux command for us.
select distinct dir from (
select 'mkdir -p '||regexp_replace(fname,'(^.*)/[^/]*$','\1') dir
select name fname from v$controlfile
select name from v$datafile
select name from v$tempfile
select member from v$logfile
select 'mkdir -p '||value dir from v$parameter where isdefault='FALSE' and type=2 and not value like '%,%' and value like '/%'