Linux command (like cat) to read a specified quantity of characters


/ Published in: Bash
Save to your folder(s)

Is there a command like cat in linux which can return a specified quantity of characters from a file?


Copy this code and paste it in your HTML
  1. head -c 100 file # returns the first 100 bytes in the file
  2. tail -c 100 file # returns the last 100 bytes in the file
  3. dd count=5 bs=1 if=filename

URL: http://stackoverflow.com/questions/218912/linux-command-like-cat-to-read-a-specified-quantity-of-characters

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.