Skip to content

Magenaut

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

files

Linux command line. Move all files and directories in directory, except some files and directories

August 8, 2022 by Magenaut

I have a folder A which has files and directories, I want to move all those files and directories to another folder B, except file, file2, directory, and directory2.

Categories Q&A, Unix & Linux Tags command-line, directory, files, move Leave a comment

Tar produces different files each time

August 8, 2022 by Magenaut

I often have large directories that I want to transfer to a local computer from a server. Instead of using recursive scp or rsync on the directory itself, I’ll often tar and gzip it first and then transfer it.

Categories Q&A, Unix & Linux Tags files, hashsum, tar Leave a comment

Why size reporting for directories is different than other files?

August 8, 2022 by Magenaut

I was wondering why an empty directory occupied 4096 bytes of space and I have seen this question. It is stated that space is allocated in blocks and hence, the size of a new directory is 4096 bytes.

Categories Q&A, Unix & Linux Tags files, filesystems, ls Leave a comment

Modify a file without creating another file

August 8, 2022 by Magenaut

% select all lines

Categories Q&A, Unix & Linux Tags files, scripting, text-processing Leave a comment

How to prevent users from deleting a directory?

August 8, 2022 by Magenaut

I tried “chattr +i DIRNAME”, it’s great, but I cannot create files in the DIR after chattr. What else are there to prevent users from deleting a Directory?

Categories Q&A, Unix & Linux Tags files, permissions Leave a comment

How to find what device a file is on (and use that in a script)?

August 8, 2022 by Magenaut

I want to find out what device my file is on so that I can use it in a script. I can get this far:

Categories Q&A, Unix & Linux Tags awk, files, sed, shell Leave a comment

Directory listing not fully sorted

August 8, 2022 by Magenaut

I have the following directory listing on a Debian Linux system. However, one strange thing is that the file populate.sql does not seem to be sorted with the rest.

Categories Q&A, Unix & Linux Tags filenames, files, filesystems, sort Leave a comment

How can I make a special file that executes code when read from

August 8, 2022 by Magenaut

Most files on a Linux system are normal files, i.e. they are saved on disk and reading from them just reads from a specified chunk of memory on the disk. How can I make something that behaves like a file in terms of being able to read from it as one would a normal file, … Read more

Categories Q&A, Unix & Linux Tags files, filesystems Leave a comment

“no such file or directory” message when deleting a file that exists on NTFS

August 8, 2022 by Magenaut

I have a directory with images. Suddenly I found out that there’s a new image with a new name. The image content is similar to another image in another directory but with a different name. I didn’t copy this image to this directory.

Categories Q&A, Unix & Linux Tags files, ntfs, rm Leave a comment

Find files in directory with paired names

August 8, 2022 by Magenaut

I’m running tests of a variable-size-and-contents test set. Data files are added and removed frequently. I’m looking for an automated way of gathering a file list.

Categories Q&A, Unix & Linux Tags directory, files, find, shell-script Leave a comment
Older posts
Newer posts
← Previous Page1 … Page8 Page9 Page10 … Page14 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