Questions tagged [files]
Manipulating files: copying, renaming, searching, analyzing, archiving, etc. For operating on text in a file, see /text-processing. For questions about the Files file manager (formerly Nautilus), see /nautilus.
5,059 questions
0
votes
0
answers
44
views
Is there an equivalent of /dev/null or tmpfile() for directories? [duplicate]
I use an application that when it starts up, it creates lots and lots of files in a specific directory.
These files are apparently useless, as I frequently remove them and I have never seen any ...
1
vote
0
answers
47
views
How do I recover a lost output file? [duplicate]
I was running a nohup'd badblock scan when I started running another nohup job in the same directory. I was assuming the jobs might mess up each others output, but what happend was (in aftersight no ...
1
vote
0
answers
58
views
What can go wrong with this command for flatten a directory recursively?
I have a very messy deep file hierarchy tree of files with duplicate names in different directories and possibly even duplicate files with different names.
$ find mp4/ -type f | more
mp4/._.DS_Store
...
0
votes
0
answers
37
views
Does ext4 allow partial update of unwritten to written extents in O_DIRECT case
O_DIRECT allows writes on a file to proceed with i_rwsem in read mode.
Let's say I have allocated 100 fs blocks(4K) for a file with posix_fallocate(). This now becomes an unwritten extent for the file....
-2
votes
1
answer
117
views
Mass file integrity checking
I have many, many tb of files from over the years, stored poorly and transferred. Mostly from Win7 days.
I am mindful that bitrot is a problem and I’m sure in my travels Ive seen a couple videos which ...
5
votes
4
answers
525
views
Creating n folders with equal number of files from a large folder with all files
I have a large folder of data files, which I want to copy into subfolders to make a specified number of batches.
Right now I count how many files there are and use that to make ranges, like so:
cd /...
10
votes
7
answers
1k
views
Check if multiple files exist on a remote server
I am writing a script that locates a special type of file on my system and I want to check if those files are also present on a remote machine.
So to test a single file I use:
ssh -T user@host [[ -f /...
0
votes
1
answer
87
views
bbe combine 2 files using blocks
I have 2 files: nand and spare.
I need to combine them like this:
first 512b from nand + first 16b from spare + second 512b from nand + second 16b from spare + and so on
I'm on Kali.
0
votes
0
answers
67
views
Cannot access files to delete
I currently use freefilesync on ubuntu 24.04 to back up my data. A couple of months ago I started to get errors on the external backup disk that a quick (and ineffective) look didn't resolve so I just ...
0
votes
0
answers
83
views
best way to have multiple homes?
I have a number of drives on a given machine with different disk configuration.
root drive.
2 disk mirror.
zfs array.
To accommodate a variety of failure scenarios, I want user homes to be:
zfs ...
6
votes
1
answer
730
views
How to find files by size that are not divisible by 4096 and round them up
In Linux in a Folder there are many files, all created with fallocate with random size.
How to find files whose size is not divisible by 4096 and correct the filesize (rounded up) to a multiple of ...
0
votes
0
answers
39
views
How does the search algorithm in Gnome Files traverse the directory tree?
If I place myself in some directory C and press the search lens and type some keywords, are files matching the keywords in directory C displayed first? This is not obvious, for instance if the search ...
0
votes
2
answers
132
views
when opening a FIFO for reading+writing, and blocking - how to tell if other side opened for reading or writing?
If I open a fifo for reading+writing in blocking mode:
fd = open("foo", "O_RDWR");
Then it blocks until someone on the other end opens it for either reading or writing. But how do ...
-2
votes
1
answer
1k
views
wrong fs type, bad option, bad superblock on /dev/sda1
I'm new to Linux (just over 1 month) and I’ve encountered a problem with my drive.
I have the main drive (SSD) and a secondary drive (HDD).
The HDD was working fine, but now I’m getting this error ...
0
votes
1
answer
255
views
How can I fix badly broken permissions on root directory [duplicate]
I accidentally changed the permissions of everything in my root directory with
sudo chown -R martin:www-data /
by hitting enter too early. I stopped this command is it starting throwing errors about /...