Skip to content

Magenaut

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

directory

Remove empty directory trees (removing as many directories as possible but no files)

August 8, 2022 by Magenaut

Suppose I have a dir tree like this:

Categories Q&A, Unix & Linux Tags directory, rm, shell Leave a comment

How can I force unzip / zip not to create a subdirectory when I extract it?

August 8, 2022 by Magenaut

Depending on how a zip file is created, sometimes it will extract all of the files directly, and sometimes it will extract the files into a subdirectory.

Categories Q&A, Unix & Linux Tags directory, zip Leave a comment

What are the advantages of the Unix file system structure

August 8, 2022 by Magenaut

If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system.

Categories Q&A, Unix & Linux Tags directory, directory-structure, filesystems, linux Leave a comment

number of folders in a directory (recursive)

August 8, 2022 by Magenaut

I would like to print the number of folders (recursive, excluding hidden folders) in a given CWD / current directory. What command, or series of commands can I use to ascertain this information?

Categories Q&A, Unix & Linux Tags bash, directory, find Leave a comment

Bulk remove a large directory on a ZFS without traversing it recursively

August 8, 2022 by Magenaut

I want to remove the contents of a zfs datasets subdir. It’s a large amount of data. For the pool “nas”, the path is /nas/dataset/certainFolder

Categories Q&A, Unix & Linux Tags directory, filesystems, recursive, rm, zfs Leave a comment

Write-only permission for a directory doesn’t allow to rename (move) files inside?

August 8, 2022 by Magenaut

In fact, I would like to ask more general question — “what does write permission for a directory allow you to do exactly?” — but let’s approach it with a concrete example.

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

ls -l –group-directories-first (act on symlinks as well)

August 8, 2022 by Magenaut

ls option --group-directories-first causes directories to be listed on the top, which makes the output of ls nice and clean:

Categories Q&A, Unix & Linux Tags bash, directory, ls, symlink, zsh 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

How do I delete a folder but not the contents?

August 8, 2022 by Magenaut

My directory (in Linux) looks like com/com/{various,files} where com and com are folders of the same name and the second com holds the various files. I want the first com removed, but the second and files in the second kept.

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

octal dump of directory

August 8, 2022 by Magenaut

I got a copy of The Unix Programming Environment by Kernighan and Pike from a garage sale. I’m very interested in the chapter about the UNIX filesystem. Naturally, I also found this passage very interesting:

Categories Q&A, Unix & Linux Tags directory, filesystems, linux Leave a comment
Older posts
Newer posts
← Previous Page1 … Page6 Page7 Page8 … Page11 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