0

I am trying to copy the content of a file using redirect operation. But after a weird block (Block elements) i am getting only a single letter and rest file is empty, though original file having complete data.

[root@ls-prd-server] cat /var/log/Maint/sec.log >> /tmp/logerr
[root@ls-prd-server]# more /tmp/logerr
▒▒E


















[root@ls-prd-server]

Please help me to understand what I missed or did wrong.

2
  • 1
    More details, please. What's a "weird block (block elements)"? Size of target file? Hexdump of source & target file? Of weird block? Commented Jan 27, 2020 at 14:41
  • Thanks RudiC for response. this block is MEDIUM SHADE as per ascii table and size of target file is same as orignal file 936 bytes. Commented Jan 27, 2020 at 14:46

1 Answer 1

1

Note that more will interpret the special ASCII code ! So, for example, if you have in 1k file 500k of \b (ascii=0x07), then you log file, when more'd, will just look like it's empty.

Instead, and as mentionned in comments, use hexdump or similar tool to inspect the real content of your file.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.