LXC.FILE.CREATE(1)

πŸ“¦ version 5.21.6, in opensuse-leap 16.0

πŸ’… NAME πŸŽ€

lxc-file-create β€” the glow-up command that creates files and directories inside your instances, bestie. No cap.

Oh and hey, real quick: this whole page lives in the LXD - Command line client(1) manual, so like… that's the family it belongs to. 🫢


✨ SYNOPSIS ✨

lxc file create [:]/ [] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. lxc file create literally creates files and directories in instances. That's the whole vibe. That's the job. Iconic, low-effort, does exactly what it says on the tin. πŸ’–


πŸ”₯ OPTIONS πŸ”₯

  • -p, --create-dirs[=false] β€” creates any directories necessary along the way, so you don't gotta mkdir by hand like a peasant ✨
  • -f, --force[=false] β€” forces the file or directory into existence. It's giving main character energy, ngl πŸ’…
  • --gid=-1 β€” sets the file's gid on create. Default is -1, fr fr
  • --mode="" β€” sets the file's perms on create. Default is empty, just sayin'
  • --type="file" β€” the type to create: file, symlink, or directory. Defaults to "file" πŸŽ€
  • --uid=-1 β€” sets the file's uid on create. Default -1, iykyk

🌸 OPTIONS INHERITED FROM PARENT COMMANDS 🌸

These bad boys come from the parent command β€” not technically hers, but she's borrowing them and they slay:

  • --debug[=false] β€” shows all the debug messages, every last one πŸ™ˆ
  • --force-local[=false] β€” force using the local unix socket
  • -h, --help[=false] β€” prints help, the classic
  • --project="" β€” override the source project. Default is empty
  • -q, --quiet[=false] β€” don't show progress information, for when you simply cannot with the noise πŸ’€
  • --sub-commands[=false] β€” use this with help or --help to view sub-commands
  • -v, --verbose[=false] β€” shows all the information messages. She's chatty, we love her
  • --version[=false] β€” prints the version number πŸ‘‘

πŸ’œ EXAMPLE πŸ’œ

Okay bestie, examples are the whole point, so pay attention:

lxc file create foo/bar
        To create a file /bar in the foo instance.
lxc file create --type=symlink foo/bar baz
        To create a symlink /bar in instance foo whose target is baz.

See? First one: a plain file. Second one: a symlink pointing at baz. Ate. πŸ“


🌈 SEE ALSO 🌈

  • lxc-file(1) β€” go read the parent page, she raised this one 🧚

⭐ HISTORY ⭐

  • 22-Aug-2026 β€” Auto generated by spf13/cobra

Heads up bestie: this page was auto generated by spf13/cobra, so don't come for me about the formatting, I'm just the messenger πŸ’€

And that's the whole page, periodt! πŸ’…βœ¨ Big kiss from the LXD - Command line client(1) manual, dated Aug 2026, auto generated by spf13/cobra β€” mwah, take care of her, she's iconic πŸŽ€πŸ«ΆπŸŒŸ

πŸ“¦ where this page comes from