Questions tagged [files]
Organized data encoded in a pre-defined format and stored on a filesystem.
684
questions
1
vote
1
answer
111
views
.htaccess to normalize requests to files with or without extension to URL without extension: $1(\.html?) --> $1
This is a followup question
My intended .htaccess ruleset has overall been achieved.
See that file in its current form quoted below.
Remaining problem: One ruleset yet not working
Goal: Normalize ...
1
vote
2
answers
242
views
.htaccess files directive only matching when I'm checking the same folder
I've got a server set up where I want a specific PHP file to be readable via the browser, but I want access to be denied to the rest of the PHP files. So I put this .htaccess in the server root:
<...
0
votes
1
answer
56
views
Why would /etc/krb5.keytab change?
A half-dozen boxes out of hundreds reported a changed /etc/krb5.keytab all within a few minutes of each other on a random Saturday. No one was logged in at the time of the changes. I have asked for ...
1
vote
1
answer
198
views
If Robocopy is run from a different server, does it copy the files across the network if the source and destination are the same server?
As part of our build and deployment process, we deploy applications from Server A (our build server running GitHub self-hosted runner) to Server B (web server). The process involves publishing from ...
1
vote
0
answers
163
views
Files with apparent 86TB file size, how to shrink them?
After extracting a zip, I have 8.6P in apparent size but only 728M on disk used. I did some checks and hdparm --fibmap shows that all the files have a huge byte_offset: 94331430207488.
I tried to use ...
0
votes
0
answers
363
views
ICSharpCode.sharpziplib.zip.zipexception. Cannot find central directory
Every time we run a certain commercial software in a Windows Server 2019 we get a pop-up window with this error:
ICSharpCode.sharpziplib.zip.zipexception. Cannot find central directory
It looks like ...
0
votes
0
answers
252
views
How to save my files from initramfs for Ubuntu 22.04, which is unable to boot?
My Ubuntu got broken because UUID isn't correct, and I try all the ways but not fix it, so I decided to reinstall Ubuntu again. However, I need the old files in Ubuntu, is there any way for me to copy ...
0
votes
0
answers
99
views
Duplicate files with the server name on a File Server
For some time it has been happening to me that in a file server, where I have a shared folder with the departments of the company, in some folders it has been duplicating some files by adding the name ...
0
votes
0
answers
288
views
NGINX - How to serve file with filename that begins with the last segment of uri?
I have many PDFs in a \drawings folder on my server. The filename structure is: 8 digits, underscore, Rev level letter -- i.e. \d{8}_[A-Za-z]\.pdf. These files are organized in subfolders that match ...
1
vote
2
answers
86
views
Delete folders asynchronously
I have a large file system in which I have to delete certain directories from time to time. Currently I have a script which amongst other things, deletes a folder and subsequently generates an email ...
0
votes
1
answer
108
views
How are files routed through the network when using a copy command with UNC paths as the source and destination?
Given a command like robocopy "\\UNC1" "\\UNC2" /E /MT:128 /R:0 /W:0 executed from a workstation.
Do files move like this
or more like
2
votes
1
answer
220
views
Discrepancy in file usage after rsync
I copied files from an exFAT filesystem to an ext4 filesystem:
sudo rsync -avz /media/user/1TB-SD-EX/ -e ssh example.com:/data/pc/sd1tb
After successful run I check source and destination size with ...
2
votes
2
answers
329
views
Using file system (AWS EFS) as cheap database for Lambda function
I am designing a database that could easily be represented as a large collection of files containing fixed size records, with sequence numbers 0,1,... This could fit nicely in DynamoDB with the ...
0
votes
0
answers
118
views
Serving Static files from different folders
How can I publish multiple folders on a server to different locations or disks on a server?
Example...
mydomain.com/files
I want /files to be able to see the contents of folders in c:/myvideos or f:/...
0
votes
1
answer
469
views
Permission for Users group successfully modified via code, but change is not reflected in Security tab for the Users group
I have C# code (at the end) which:
Creates a file
Prints the current ACL
Gives the builtin users group "write permissions" to the previously created file
Prints the current modified ACL
...
0
votes
1
answer
850
views
Associate old domain user profiles/files to accounts on new domain
I have 2 domains, A and B. We are migrating our user profiles and computers from A to B using ADMT. Our test accounts and machines migrate fine, however the only issue is that it updates the SID, so ...
5
votes
1
answer
9k
views
How to output all files/folders ordered by size, including hidden ones
How can I output all files/directories, ordered by size, including hidden ones
(those whose name starts with a dot), all in one go?
By size of a directory, I mean the sum of all file sizes in the ...
1
vote
1
answer
149
views
rsync Delete only Matching files
How can I use rsync (or another program) to delete identical files between directories? To be identical, location and metadata should match (permissions, ownership, timestamp)
For example, I backup ...
0
votes
2
answers
147
views
Cronjob to visit each url of a list but not save them
I have a txt file list.txt that have bunch of urls, one every line. I want to set a cron job that wget/curl each url of the file once a day but does not save them in the computer.
I tried to run this ...
0
votes
1
answer
57
views
Way to save apache losgs with IP Info
i use this command to live see apache logs:
sudo tail -f /var/log/apache2/access.log
I use a Ubuntu 18 VPS wich i have root access.
this logs are also saved to the access.log file true? (because when ...
0
votes
0
answers
125
views
RSYNC :: How to copy only new files... if you delete the files you previously copied?
I have a remote server that is continuously generating log files and saving them to a directory. Unfortunately, the log files are generated at random times, so you can't predict when the next logfile ...
0
votes
1
answer
336
views
Need help in Moving files to the backup directory except the last 10 files based on file NAME not date modified
I have a situation where a server is creating journal files (MJ00001-MJ000x) and I want to move all the files to a backup directory but need to keep the last 10 in there to get the archive.
I looked ...
0
votes
1
answer
7k
views
Where to find the website folder in ubuntu server?
So someone gave me the task to find where is the website code exist on ubuntu server
when I look at the the index.html file path it is
/var/www/example.com/html
but when I go to /var/www directory I ...
1
vote
1
answer
2k
views
How to trigger an event after saving a chosen csv file in Google Cloud Storage bucket
Trying to make a synchronous pipeline, I need to copy a csv file from Google Cloud Storage after it has been saved in Google Cloud Storage. The copy job does not have to be triggered right after the ...
1
vote
1
answer
31
views
Questions about Debian OpenDLAP configuration
I have the slapd/stable,now 2.4.57+dfsg-3 amd64 Debian 11 package. I read the official OpenLDAP documentation and Debian article.
But I cannot understand the difference between the multiple ...
0
votes
1
answer
517
views
How can I search for symlinks that point to other symlinks? [closed]
I have morass of chained symlinks like this scattered around:
A (symlink) -> B (symlink) -> C (file)
Some may even involve longer chains, I'm not sure yet.
When manually examining a single file ...
0
votes
0
answers
112
views
How to merge two data sources with slightly different folder names
How can I copy all .msg files that are spread throughout some GUID sub-folders in one folder to another folder that has a slightly different folder name at the end. Is it possible?
So for example:
...
1
vote
0
answers
158
views
How can a file be visible to a regular user but non-existent to root?
I have asked this question yesterday but it was marked as duplicate and closed because of its context, as it was thought to be an X/Y question, whereas I was just interested in the general matter of &...
3
votes
1
answer
3k
views
Why is AWS S3 Object count is measured iin units used to measure file size?
In AWS, the files/objects are stored in S3 bucket and the files/object count should list the total no of files/objects stored in S3 bucket as an INTEGER value.
But I see the S3 object count as ...
1
vote
1
answer
303
views
What could cause files to end up zeroed out?
A client sent us an external hard drive where at least half the files are corrupt. They are broad mix of filetypes (images, documents, etc) and there is no discernible pattern into which are corrupt. ...
0
votes
1
answer
671
views
Drupal 9 files storage on Azure App service
Been fighting with the problem for a month now. Have Drupal 9 set up on Azure App service with docker images running php8 (base image drupal:9.1.7-php8.0-apache) I have found out that there are two ...
0
votes
0
answers
69
views
Deleted public_html without reason
I had a problem today in the morning which I am still trying to figure it out, so it does not happen again.
Somehow a lot of files from public_html got deleted, except one folder. I did not delete ...
0
votes
1
answer
366
views
Cron to find multiple file types and automatically delete them
I am trying to put together a command that will find multiple file types and automatically delete them. I want to run this in a cron every 10 minutes on my server.
I would like to find files of type: ....
0
votes
1
answer
21
views
Compare two files to find the same output in each
I have a file1.txt and file2.txt i want to tell if all the information in file1 is in file2. If it is, then output it to file3.txt otherwise dont do anything.
I looked at comm command and diff, but it ...
0
votes
1
answer
1k
views
User-Permission on Folder without affecting owner:group
How can I allow a specific user on my Ubuntu desktop to view/open all folders and files in a specific location without affecting or changing the owner:group of that location?
Until now I need to ...
1
vote
2
answers
424
views
GREP multiple lines that are not next to each other
I have a text file that looks like this:
landlord: John Smith
has:
house: 0
flat: 5
available: 1
cheap: 0
quality: 1
landlord: Will Hall
has:
house: 3
flat: 4
available: 1
...
0
votes
0
answers
55
views
how to prevent my test.md and composer.json from being access publicly?
I have a test.md file which contains some written texts and a composer.json
the problem is when i typed test.md along with the url of my site, it gets downloaded.
if i type composer.json appended to ...
5
votes
2
answers
1k
views
How to manage a modified copy of a file?
Following this answer, I want to make a copy of OpenSSL's configuration, with a specific set of changes. The original file is out of my control, so I can't make it a template.
At the moment I have:
-...
0
votes
0
answers
157
views
AWK to read multiple files in linux without duplicates
I have a task to merge three files in linux, so i used awk to achieve this task.
hostsfiles is a variable which has test.txt test1.txt and test3.txt
awk 1 {{ hostsfiles | join(' ') }}
I get below ...
-2
votes
1
answer
648
views
How to save to a "virtual local drive" and have the data streamed to a remote drive? [closed]
(This is for Windows computers.)
So, the reason why I need this is not really important, but generally speaking...
I have a program which takes a long time to generate a huge file (like 100's of GB).
...
0
votes
1
answer
163
views
change files changed time to created time
I have an apache web server which serves files over webdav (Ubuntu 18.04.5, Apache 2.4.29 with mod_dav enabled)
I modifed the permissions with chmod on all files and now the webserver returns the ...
0
votes
1
answer
230
views
What will happen to the files under domain after changing to a workgroup
I recently change from domain to a workgroup because of trust issue error, unfortunately I forgot to backup all my files in the domain, is it possible to recover my files after returning to the domain ...
0
votes
2
answers
210
views
Trigger a command when two files have arrived in different directories in Centos 7
I need to launch a command when two files from different sources are present. Every file could arrive in different time, but I want to trigger the command when both were received. I have tried to do ...
1
vote
1
answer
2k
views
Why is transferring large local files in PowerShell so slow for me
I am currently using PowerShell's Copy-Item commandlet to create a copy of a 500GB file and transferring it to another local hard drive on the computer. Doing it this way is really slow: a couple ...
0
votes
2
answers
211
views
How to generate file size statistics in Windows 7?
Say I have a PC connected to some experimental instrumentation. C: is the system partition with Windows 7 and all the programs on it, and D: is the storage partition where all the acquired data is ...
1
vote
0
answers
137
views
AWS Windows 10 Error 0x80070780: The file cannot be accessed by the system
We have log files stored on one of our AWS machines, however, a significant amount of the log files have been corrupted without any clearly apparent reason.
When trying to open/read/write/rename/...
2
votes
1
answer
1k
views
How do I know what the standard location is for putting server files on Linux systems?
I'm just getting into doing my own hosting, and it seems like there are often common practices for choosing file locations.
For example, I found this website that says that there are standard places ...
0
votes
0
answers
2k
views
502 Bad Gateway when uploading files (NGINX and NodeJS)
I am developing an app where the user can upload files.
While the backend call seems to work fine, the call when uploading files returns a 502 Bad Gateway message.
The files actually get uploaded but ...
0
votes
1
answer
2k
views
Explanation :File permissions override folder permissions, unless the Full Control permission has been granted to the folder
According to the article:
http://ntfs.com/ntfs-permissions-precedence.htm
The hierarchy of precedence for the permissions can be summarized as
follows, with the higher precedence permissions listed ...
0
votes
1
answer
402
views
How can I rsync a directory that might be busy with updating files?
I would like to transfer a directory of files to a remote destination. Easy.
However, at any given time, one or many of these files may be in-use and being updated by users.
This doesn't bother rsync ...