Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

file-copy

Rsync, include only certain files types excluding some directories

August 11, 2022 by Magenaut

I want to rsync only certain file types (e.g. .py) and I want to exclude files in some directories (e.g. venv).

Categories Q&A, Unix & Linux Tags file-copy, rsync Leave a comment

How can I copy a file and create the target directories at the same time?

August 10, 2022 by Magenaut

I want to cp aaa/deep/sea/blob.psd to bbb/deep/sea/blob.psd

Categories Q&A, Unix & Linux Tags directory, file-copy Leave a comment

Is it a UUOC (useless use of cat) to redirect one file to another?

August 9, 2022 by Magenaut

If I want to make the contents of file2 match the contents of file1, I could obviously just run cp file1 file2.

Categories Q&A, Unix & Linux Tags cat, file-copy, files, io-redirection Leave a comment

How do you compare two folders and copy the difference to a third folder?

August 9, 2022 by Magenaut

You’ve got three folders:

Categories Q&A, Unix & Linux Tags diff, file-copy, files, rsync Leave a comment

Why use install rather than cp and mkdir?

August 9, 2022 by Magenaut

I’ve seen in many places used install -d to create directories and install -c to copy a file. Why not use mkdir and cp? Is there an advantage in using install?

Categories Q&A, Unix & Linux Tags file-copy, software-installation, utilities Leave a comment

How to verify a file copy is reflink/CoW?

August 8, 2022 by Magenaut

I’m playing with btrfs, which allows cp --reflink to copy-on-write. Other programs, such as lxc-clone, may use this feature as well. My question is, how to tell if a file is a CoW of another? Like for hardlink, I can tell from the inode number.

Categories Q&A, Unix & Linux Tags btrfs, file-copy Leave a comment

Can I transfer files using SSH?

August 7, 2022 by Magenaut

I am using PuTTY on Windows 7 to SSH to my school computer lab. Can I transfer files from my Windows machine to my user on the school machines using SSH?

Categories Q&A, Unix & Linux Tags file-copy, putty, ssh, windows Leave a comment

Duplicate file x times in command shell

August 7, 2022 by Magenaut

I try to duplicate a video file x times from the command line by using a for loop, I’ve tried it like this, but it does not work:

Categories Q&A, Unix & Linux Tags file-copy, files, shell Leave a comment

Verifying a large directory after copy from one hard drive to another

August 7, 2022 by Magenaut

I have a home file server that I use Ubuntu on.

Categories Q&A, Unix & Linux Tags checksum, file-copy, file-transfer, files, ubuntu Leave a comment

How to clone/copy all file/directory attributes onto different file/directory?

August 7, 2022 by Magenaut

I want to copy the attributes (ownership, group, ACL, extended attributes, etc.) of one directory to another but not the directory contents itself.

Categories Q&A, Unix & Linux Tags backup, file-copy, filesystems, xattr Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress