Using an alias in find -exec

前端 未结 7 718
醉酒成梦
醉酒成梦 2021-01-07 19:11

I have a very long command in bash, which I do not want to type all the time, so I put an alias in my .profile

alias foo=\'...\'

Now I want

7条回答
  •  感情败类
    2021-01-07 19:53

    Another way of calling an alias when processing the results of find is to use something like this answer

    so the following should work:

    alias ll="ls -al"
    find . -type d | while read folder; do ll $folder; done
    

提交回复
热议问题