files

Moving and organizing files with find

Moving and organizing files with find I have a folder on a Debian GNU/Linux 12 (bookworm) x86_64 Server used as a NAS/Homelab server with a lot of files from a surveillance camera. MDAlarm_20240301-091804.jpg … MDAlarm_20240316-153813.jpg MDAlarm_20240327-183713.jpg If I try to move the files with (eg) mv snap/*.jpg /path/to/dest/2024/03 I get -bash: /usr/bin/mv: Argument list too …

Total answers: 1

How to clean up a Linux system to free up disk space?

How to clean up a Linux system to free up disk space? What are some generic ways to free up lots of storage space without deleting personal files? I’m doing a distro upgrade (Debian11->12) and it needs lots of disk space on the root partition / which doesn’t have a large size and I’d like …

Total answers: 1

Can you tell me why rsync is saying my files are different

Can you tell me why rsync is saying my files are different I’m using rsync to sync files from my NAS to a Remote Server. The files on the Remote Server appear to have the same user, group and permissions as the source. However rsync wants to copy the files anyhow. Here is the output …

Total answers: 1

Multi computer cron

Multi computer cron I have many computers and I ssh between them. I have a single cron file, which I manually type after into each computer. And when I change this cron file, I have to manually ssh into each computer to update its cron accordingly. Is there any way to have each computers cron, …

Total answers: 1

Access USB device with Bash script

Access USB device with Bash script I am using a Raspberry Pi 4 Model B. I am trying to make a script that runs automatically whenever a USB device is plugged in. It will try to read from a text file on the USB device. This is what I have achieved so far. The USB …

Total answers: 1

Permission denied when opening a file in gdb

Permission denied when opening a file in gdb I’m implementing some CTF challenges. The flags are in some text files, that get read from the programs. To protect the flags I have changed the owner of the files, but have set the setuid to the executables to be able to read the files. It works …

Total answers: 1

Rsync throwing errors but files appear to be fine

Rsync throwing errors but files appear to be fine I am doing a massive 200TB transfer with rsync. I used a shell script I found off the internet to spawn a few processes but here is the relevant rsync command itself: rsync –recursive –whole-file –inplace –sparse –no-compress –max-alloc=8GiB –size-only –human-readable –info=progress2 –log-file="$rsync_file_basename.log" –log-file-format="%o=%-7”’b | total=%-7”’l …

Total answers: 1

How does KD acronym unveils? /usr/include/linux/kd.h

How does KD acronym unveils? /usr/include/linux/kd.h I do understand that it is related to console (a "real" TTY which is at Ctrl+Alt+F[1-9]). ioctl_console man page lists many KD* prefixed constants. there is also a vt.h in /usr/include/linux which is easy – a VT – virtual terminal or a pseudo-terminal. What a heck is KD? Asked …

Total answers: 1

Not able to delete a file even if using sudo command on ubuntu 22.04 LTS

Not able to delete a file even if using sudo command on ubuntu 22.04 LTS I have a text file Summary_DataTypes.txt which was created by me earlier. It appears in lsand vs code. But does not show in the folder even if I do show hidden folder. I want to delete this file but sudo …

Total answers: 1

How to automate the compression of the contents of each subfolder in a directory?

How to automate the compression of the contents of each subfolder in a directory? I’m looking to automate the compression of the contents of each subfolder (excluding the subfolder itself) in a directory, with each .zip of said contents corresponding to each subfolder. Is there a way to do such a thing in Ubuntu 22.04? …

Total answers: 1

How can I create a file named "?$*'ChouMi'*$?"?

How can I create a file named "?$*'ChouMi'*$?"? I need to create a file with this exact name "?$*’ChouMi’*$?" so that ls would show it as: $ ls | cat -e "?$*’ChouMi’*$?"$ $ Asked By: prince royce || Source Put the name in single quotes. This makes the shell not process backslashes or things that …

Total answers: 1

Batch rename of files that share the same prefix

Batch rename of files that share the same prefix I have a list of files on my server with a prefix that I want to de-dupe. These are completely different generated files. It seems to be generated files with {Title} – {yyyy-MM-dd}_{random} – {Description}.ts For example: Camera Recording – 2023-08-11_14 – Front Deck.ts Camera Recording …

Total answers: 2

Command-line tool enabling tagging and related tags functionality

Command-line tool enabling tagging and related tags functionality Is there a command-line tool that enables to give a file more attributes than a name? For example, we have a file called ubuntu.pdf and we give it tags like command-line, shell, nautilus, my_favourite_stuff, whatever_else and a file linux.pdf with tags shell, command-line, ln, best_book and than …

Total answers: 2

Copy an evenly spaced subset of files

Copy an evenly spaced subset of files For example I have files : file0.txt file1.txt file2.txt …. file100.txt I would like to copy 5 files in bash, which will produce result : file0.txt file19.txt file39.txt file59.txt file79.txt Edit. screwed up counting should be this: file0.txt file20.txt file40.txt file60.txt file80.txt So files are evenly spaced sampled. …

Total answers: 4

Create bootable iso file from rootfs linux files

Create bootable iso file from rootfs linux files I want to make bootable iso file from typical Linux distributive files. I have tried to make grub bootloader, firstly I created template for grub.cfg using grub-mkconfig and I added this configuration at start of it: set default=0 set timeout=5 menuentry "LinuxTest" { set root=(hd0) linux /boot/bzImage …

Total answers: 1