[Runtime
](../../../index.md)[Package Manager
](../../../pm/cli/install/index.md)[Bundler
](../../../bundler/index.md)[Test Runner
](../../../test/index.md)[Guides
](../../index.md)[Reference
](https://bun.com/reference)[Blog
](https://bun.com/blog)[Feedback
](../../../feedback/index.md)
Bun exposes stdout as a BunFile with the Bun.stdout property. This can be used as a destination for Bun.write(). This code writes a file to stdout similar to the cat command in Unix.
cat.ts
const path = "/path/to/file.txt";
const file = Bun.file(path);
await Bun.write(Bun.stdout, file);
See Docs > API > File I/O for complete documentation of Bun.write().
Was this page helpful?
[
Write to stdout
Previous
](../stdout/index.md)[
Copy a file to another location
Next
](../file-cp/index.md)