Questions tagged [files]

Organized data encoded in a pre-defined format and stored on a filesystem.

Filter by
Sorted by
Tagged with
39 votes
3 answers
57k views

Does the Midnight Commander have an option to display actual dir sizes?

i have plenty of empty directories and i wonder if there's a way to display actual direcory sizes (after some sort of scan maybe) in MC
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 ...
0 votes
1 answer
8k 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 ...
13 votes
6 answers
24k views

Comparing owners and permissions of content of two folders?

How to to compare owners and permissions of content of two folders? Is there something like diff command which compare recursively two folders and display owner and permissions differences?
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 ...
3 votes
5 answers
4k views

rsync of >4GB files

silly one, do you have any problems with rsync'ing large [ >4GB ] files under modern linux? [ 32bit, 64bit, large file support turned on ]? i've done some tests on my own between 2 64bit boxes and ...
1 vote
1 answer
34 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
529 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 ...
101 votes
10 answers
90k views

How do I do Multihop SCP transfers between machines?

I want to copy a file from my machine A to server C, but only have access to server C through server B. Instead of first transferring to server B, log in and then transfer to server C, Is is possible ...
0 votes
0 answers
114 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: ...
13 votes
4 answers
9k views

Linux tools to find duplicate files?

I have a large and growing set of text files, which are all quite small (less than 100 bytes). I want to diff each possible pair of files and note which are duplicates. I could write a Python script ...
16 votes
4 answers
3k views

Concatenating files to a virtual file on Linux

On a Linux system, is there any way to concatenate a series of files into one exposed file for reading and writing while not actually taking up another N bytes of disk space? I was hoping for ...
1 vote
0 answers
165 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 &...
0 votes
1 answer
683 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 ...
79 votes
3 answers
25k views

In Bash, are wildcard expansions guaranteed to be in order?

Is the expansion of a wildcard in Bash guaranteed to be in alphabetical order? I am forced to split a large file into 10 Mb pieces so that they can be be accepted by my Mercurial repository. So I was ...
1 vote
1 answer
2k views

Can't create/write to file 'C:\Program Files\MySQL\MySQL Server 5.0\Data#sql_29c_0.MYI' (Errcode: 17)

Whenever I am doing a backup, I get this error. I checked the net for this error and have done the following things: Create a folder in MySQL\Temp and changed the temporary directory of MySQL temp ...
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
333 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
2k views

nginx hidden file deny configuration?

I am using the below standard config to block download of hidden files from nginx : #Prevent (deny) Access to Hidden Files with Nginx location ~ /\. { access_log off; ...
26 votes
7 answers
76k views

How to deny the web access to some files?

I need to do an operation a bit strange. First, i run on Debian, apache2 (which 'runs' as user www-data) So, I have simple text file with .txt ot .ini, or whatever extension, doesnt matter. These ...
3 votes
1 answer
11k views

What are the file name limitations in an FTP path?

What characters are allowed and what is the maximum length of a filename in an FTP path? And can the rules be different between the various FTP servers? Any other limitations?
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
367 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 ...
60 votes
18 answers
30k views

Favorite rsync tips and tricks

The more I use rsync the more I realise that it's a swiss army knife of file transfer. There are so many options. I recently found out that you can go --remove-source-files and it'll delete a file ...
11 votes
4 answers
27k views

Delete files older than X days on remote server with SCP/SFTP

Do anyone know some good way to delete files on remote server that are older than X days using just SCP/SFTP? Sure I can write some script on perl etc but I feel it's overkill. Any UNIX way? Oneliner? ...
1 vote
2 answers
426 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
60 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: -...
3 votes
7 answers
15k views

Fast way to recursively count files in linux

I'm using the following to count the number of files in a directory, and its subdirectories: find . -type f | wc -l But I have half a million files in there, and the count takes a long time. Is ...
1 vote
1 answer
128 views

Restore AWS Storage Gateway Server

I just setup an AWS File Storage Gateway server on-prem. I was able to connect it to an S3 bucket and I can mount it as an NFS share to Linux servers which is great. My concern though is this - if for ...
-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). ...
-1 votes
1 answer
2k views

Mac Files hidden but visible from Windows PC

I'm new to the forum here. and i am having an issue that is starting to occur more and more over the last few days. With the Macs, InDesign files are created and edited on a day to day basis and some ...
0 votes
1 answer
176 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
2 answers
249 views

read the first line in a file, given the file path in BASH

I have a file stored in a location /x/y/z/file.txt. There is only an unsigned integer stored in this file. How would I read it and store it into a variable?
0 votes
1 answer
253 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 ...
-3 votes
2 answers
28k views

Upload File /Apache :: Failed to open stream: Permission denied on CentOS

uploading file to server is always giving me this error though I tried all solution on the web for this problem but I'm still getting this error no matter what : Warning: move_uploaded_file(/home/...
1 vote
0 answers
143 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/...
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 ...
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
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
2 answers
437 views

Linux, search for extended attribute value

When a directory contains some files with non-empty extended attributes, all the attribute values can be shown as follows: $ getfattr -d * # file: file1 user.comment="comment1" # file: file2 user....
3 votes
2 answers
15k views

sftp file size limit

There seem to be a file size limit for sftp transfer from the command line, if I try to download a 20 MB file it stops at 20% when the transfered data is larger than 4 MB: /myfile.xml ...
0 votes
1 answer
408 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 ...
2 votes
1 answer
1k views

What could cause local folders in a Windows 2008 DFS replication group to randomly obtain system and hidden attributes

We have a Windows 2008 server (not R2) acting as a primary file source in a DFS replication group with a single other server that happens to be Windows Storage Server 2008. All is well in terms of 2-...
-1 votes
1 answer
110 views

Recover files on a Windows 7 host from a user who has been deleted from active directory?

Is there a way to recover data (Files, Programs, etc...) on a Windows 7 machine assigned to a specific Active directory user, that has since been deleted from Active Directory? For some reason the ...
1 vote
1 answer
1k views

Modify Multiple Files Names with PowerShell in same directory

I'm a complete noob when it comes to powershell but I've been struggling with this one all day and not sure why. Each day, I will have a set of files in a directory. The files will be different ...

1
2
3 4 5
14