Using the terminal find command
I use the terminal find command to perform complex searches. I tried to do this, but it doesn't work.
mac $ find -x ~ -maxdepth 1 -iname ".bash*" -type f -exec echo {} | hexdump -C \;
hexdump: ;: find: No such file or directory
-exec: no terminating ";" or "+"hexdump:
;: Bad file descriptorOn occasion, I want to run multiple commands in the -exec portion. Is this possible? How?
This does something, but all the output ends up co-mingled. I want one line of output per hexdump output.
find -x ~ -maxdepth 1 -iname ".bash*" -type f -exec echo {} \; | hexdump -C
00000000 2f 55 73 65 72 73 2f 6d 61 63 2f 2e 62 61 73 68 |/Users/mac/.bash|
00000010 20 0a 2f 55 73 65 72 73 2f 6d 61 63 2f 2e 62 61 | ./Users/mac/.ba|
00000020 73 68 5f 68 69 73 74 6f 72 79 0a 2f 55 73 65 72 |sh_history./User|
00000030 73 2f 6d 61 63 2f 2e 62 61 73 68 5f 70 72 6f 66 |s/mac/.bash_prof|
00000040 69 6c 65 0a 2f 55 73 65 72 73 2f 6d 61 63 2f 2e |ile./Users/mac/.|
00000050 62 61 73 68 72 63 2d 77 69 74 68 2d 63 6f 6c 6f |bashrc-with-colo|
00000060 72 0a 2f 55 73 65 72 73 2f 6d 61 63 2f 2e 62 61 |r./Users/mac/.ba|
00000070 73 68 72 63 2d 77 69 74 68 2d 63 6f 6c 6f 72 2e |shrc-with-color.|
00000080 73 68 0a |sh.|
00000083Could there be some terminal command to end the output then restart the output?
R
PS. I was trying to help out in this thread.
How to delete an extra .bash_profile file found in home directory?
Mac mini, OS X Yosemite (10.10.5), Fall 2014; iPhone 4 7.1.2