Home > OS >  For a list of commands
For a list of commands

Time:09-28

Listed with the ls command recursive directory specified subdirectories in a directory name, request
1. Each category has a full set of DOS to format the path name
2. Each front path name to add a prefix -i
3. All content in one line, separated by a space,

CodePudding user response:

A similar approach

Echo ` find. -type ` d | sed -e 's//- I/g'

CodePudding user response:

Assuming the specified directory is/root/
Ls -r/root/| grep '/' | tr '/', '\ \ | tr' : ' '| sed' s/^/- l/g | tr '\ n' ' '
  • Related