---
title: "Discussion on \"How to copy file content using command line on Mac?\" | Hashnode"
description: "Discussion on \"How to copy file content using command line on Mac?\". Sometimes I want to quickly copy the contents of a file, e.g. when I'm creating a new SSH key.\nUp until now, I would use cat to read the content, then select it and finally copy it.\n$: cat id_rsa.pub\n  ssh-rsa AAAAB3NzaC1y...\nYou can do it much faste..."
url: "https://hashnode.com/posts/how-to-copy-file-content-using-command-line-on-mac/63641cb3e8477571135b77f6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to copy file content using command line on Mac?](https://blog.macieksitkowski.com/how-to-copy-file-content-using-command-line-on-mac?utm_source=hashnode&utm_medium=feed)

Sometimes I want to quickly copy the contents of a file, e.g. when I'm creating a new SSH key. Up until now, I would use cat to read the content, then select it and finally copy it. $: cat id\_rsa.pub ssh-rsa AAAAB3NzaC1y... You can do it much faste...

Nov 3, 2022 · 1 min read · blog.macieksitkowski.com  
Read the article

-   [#command-line](https://hashnode.com/tag/command-line)
-   [#macos](https://hashnode.com/tag/macos)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Maciek Sitkowski](https://hashnode.com/@sitek94)

@sitek94 · Poland

  
[View profile](https://hashnode.com/@sitek94)

mostly frontend

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
