XCLIP-COPYFILE(1)

πŸŽ€ XCLIP-COPYFILE(1) β€” the General Commands Manual page, but make it a group chat πŸŽ€

okay so bestie, welcome to the <rainbow>xclip-copyfile</rainbow> manual page. This is from the General Commands Manual section, and it's about moving files around using the X clipboard. Yes, the clipboard. Like, the thing you copy text into. But for files. Iconic behavior honestly. πŸ’…


✨ NAME ✨

xclip-copyfile, xclip-cutfile, xclip-pastefile β€” copy and move files via the X clipboard πŸ¦‹


🌸 SYNOPSIS 🌸

xclip-copyfile [-p] FILES...
xclip-cutfile [-p] FILES...
xclip-pastefile

πŸ’– DESCRIPTION πŸ’–

xclip-copyfile copies files into the X clipboard, and it recurses into directories. So like, if you hand it a folder, it does NOT chicken out β€” it goes all the way in. 🧚

xclip-cutfile copies the files, but also deletes them afterwards. So it's copy and yeet. Careful with that one bestie, that's real. 😭

  • -p β€” preserve path formation ✨

xclip-pastefile pastes the files out of the clipboard. That's the whole job. Main character energy, zero flags. πŸ‘‘


🌈 EXAMPLES 🌈

Copying a file to a remote host

[maggie.lkpg.cendio.se ~]$ echo "A file created on ${HOSTNAME}" > file1
[maggie.lkpg.cendio.se ~]$ xclip-copyfile file1
[sofie.homeip.net ~/doc]$ xclip-pastefile
file1
[sofie.homeip.net ~/doc]$ cat file1
A file created on maggie.lkpg.cendio.se

look at that, the file teleported across hosts and it didn't even lose its vibe πŸ’«

Copying an entire tree structure

[sofie.homeip.net ~]$ xclip-copyfile doc
[maggie.lkpg.cendio.se ~/tmp]$ xclip-pastefile
doc/
doc/letter-mom-april.txt
doc/file1
doc/letter-dad-march.txt

whole directory tree, pasted out, every file accounted for. she ate. πŸ“

Copying files with preserved path information

[maggie.lkpg.cendio.se ~]$ xclip-copyfile -p /etc/sysconfig/grub
tar: Removing leading `/' from member names
[sofie.homeip.net ~/tmp]$ xclip-pastefile
etc/sysconfig/grub
[sofie.homeip.net ~/tmp]$ ls etc/sysconfig/grub
etc/sysconfig/grub
ngl that tar: Removing leading /' from member namesline is just part of the show, bestie.-pkeeps the path formation, so you getetc/sysconfig/grub` instead of just the bare filename. 🫢

Moving files

[sofie.homeip.net ~]$ ls letter-brother-may.txt
letter-brother-may.txt
[sofie.homeip.net ~]$ xclip-cutfile letter-brother-may.txt
[sofie.homeip.net ~]$ ls letter-brother-may.txt
ls: cannot access 'letter-brother-may.txt': No such file or directory
[sofie.homeip.net ~]$ cd doc
[sofie.homeip.net ~/doc]$ xclip-pastefile
letter-brother-may.txt

see how the file just... left? that's xclip-cutfile doing its thing. copy, then delete, then paste somewhere else. it's giving moving truck but make it clipboard. 🚚✨


πŸ’œ AUTHORS πŸ’œ

This manual page was written by Maximilian Gass <mxey@cloudconnected.org> for the Debian project. It may be used for everything else, of course. πŸŽ€


and that's the whole page bestie, we're done here πŸ’… this was the XCLIP-COPYFILE(1) page from the General Commands Manual β€” go forth and copy files across the clipboard, no cap, fr fr. 🌟