I have a grep command like below
zgrep '123_ERROR' xyz.gz
I got lot of huge results where I cannot see top part.
So what is best way to see entire result
how to export results to a file
zgrep '123_ERROR' xyz.gz>>/home/test/testfile.txt
i used above command but i do not seem to have permission to create testfile.txt
how to create above file in one other server whose ip is say 111.1.111.111
zgrep
intoless
ormore
. – Panki Mar 01 '19 at 14:22/home/test/testfile.txt
Unless your current user is calledtest
you probably don't have access to do this. You can easily reference your own home directory with~
. Eg:zgrep '123_ERROR' xyz.gz ~/testfile.txt
– Philip Couling Mar 01 '19 at 14:30