1

i just have a simple question on the output of the shell command.The below command lists all the directory owners directory name and create time and source how can i makes this look neati.e, how do i format it

find /disk/ui -name '.user.log'|xargs cat 
rtty        Demo1           Tue Mar  6 17:45:29 IST 2012
    /disk/ui/gh
nk    wee             Tue Mar  6 15:15:25 IST 2012
              /disk0116/ui/gg/
rtty        Test_sklgfx_main                Wed Mar 14 15:17:12 IST 2012
    /disk/ui/dtr2/
DH        Test_repo               Thu Mar 15 14:03:36 IST 2012
    /disk/ui/_dtr1

Also can i add a label on the top saying owner directory name created time and source.....

1 Answer 1

4

try to use

find /disk0116/ui -name '.user_repo.log'|xargs cat | column -t
Sign up to request clarification or add additional context in comments.

2 Comments

@Rajeev, try to add echo "xxx xxx xxx" && at the begin of your command. Maybe you should add "()"at the right place. and the "xxx"means what it should be.
Use a command grouping construct: { echo "header ..."; find ... | xargs cat; } | column -t -- the spaces around the braces and the semicolon after 'cat' are required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.