Logical entities that contain data in a filesystem. Use this tag if your question: is about programs that create files (e.g. gzip, tar, zip); deals with characteristics of files (permissions, size, path/location); or is about management of files (renaming, listing, moving, removing). For operating ...
0
votes
2answers
43 views
how to replace a character in a set of file names?
I have a set of image like that :
01-12_13:20:12_1366x768.png 01-12_13:20:46_1366x768.png 01-12_13:21:01_1366x768.png 01-12_13:21:06_1366x768.png
01-12_13:20:40_1366x768.png 01-12_13:20:...
2
votes
2answers
31 views
How to view the size of the binary files using linux command?
I have the binary file csimu under the following path /data/local/tools/bin.
I checked the size of the binary file using du -sh csimu, but it shows size as 0. But I have binary contents inside the ...
3
votes
2answers
51 views
Why is writing to a existing file faster than write a new empty file?
I use MappedByteBuffer to write file in linux.
File file = new File("testFile");
RandomAccessFile raf = new RandomAccessFile(file, "rw");
FileChannel fc = raf.getChannel();
MappedByteBuffer mbf = fc....
0
votes
1answer
20 views
Smaller size of CIFS mounted Directory than the file [duplicate]
I got a curious problem. I've copied some data from an external storage to a CIFS mounted directory over scp.
When I enter ls -lah in the CIFS mounted directory, I see that the file has 10 GB.
...
0
votes
2answers
33 views
Alternative ways to list files executable by all
As the title says, I'm looking for all the alternative ways you can think of to list the files which are executable by anyone (owner, group, others) in the current directory and subdirectories.
For ...
0
votes
1answer
19 views
transfer file modified dates between two directories with different structures but identical files
Initially, I just wanted to reorganize a bunch of files. The files were in a directory. I modified the directory structure significantly and redistributed the files among the subdirectories.
However, ...
0
votes
0answers
6 views
Use a file to emulate nvme device
Can I use a file to emulate an NVMe device? I don't want to use qemu, it's really slow on my machine.
1
vote
3answers
51 views
How to change files creation time? (touch changes only modified time) [duplicate]
How to change files CREATION time? I tried to use 'touch' command but it changes only the last modified time - it does not change the first date - creation date.
(After checking by 'stat' it still ...
2
votes
1answer
27 views
How do I find which process is causing a file to lose its permissions? [duplicate]
Yesterday one of our servers was having a problem, and it turned out the file /etc/init.d/nfs-kernel-server had lost it's permissions, they were reported as just ------------. Setting the permissions ...
-1
votes
0answers
38 views
cat /proc/PID/maps permission denied [on hold]
I am trying to use this line in the terminal in order to do my homework and I don#t understand why it doesn't work. Here is my code:
#include <stdio.h>
#include <stdlib.h>
#include <...
0
votes
0answers
9 views
Is there a simple key-val storage system built in? [duplicate]
I've started preferring key-val storage over SQL. I'm hoping there's something built in that's a littler than pstore or redis.
I've been doing a lot of string (de)serializing of lists and ...
2
votes
2answers
28 views
Weird output when using ssh inside a loop over a file
The script is to read a file that contains multiple lines, each line containing a tab-delimited array. I want to execute some remote commands that take those array elements as arguments, with sudo ...
1
vote
1answer
26 views
How to get list of touched files between 2 points of time? [duplicate]
I need to get a full list of files modified, and if possible files accessed too, by a complex script, as well as all files accessed at the same time of the script running by any other process.
So i ...
1
vote
2answers
62 views
Why can't cat the file?
I have added debian8 into group www-data with command .
sudo usermod -G www-data debian8
It can be verified with command.
cat /etc/group |grep 'www-data'
www-data:x:33:debian8
The ownership ...
1
vote
2answers
68 views
mv command to move and rename set of files
I am using mv command to move a set of files from one folder to another that involves renaming the files also.
mv <SRC_PATH>/ABC_$t1.dat <DEST_PATH>/ABC_$t1_$$.dat
I am using the ...
0
votes
1answer
26 views
How do I download a file that does not have a direct link?
For example, the file available at
https://connect.nuxeo.com/nuxeo/site/marketplace/package/nuxeo-web-ui/download?version=0.8.0
will download to a zip file in my browser, but the command
wget ...
-3
votes
1answer
43 views
What kind of file is this?
I've ran file myfile and got the following:
MSVC .sbr H\002I
Any advice on what this particular file could be?
-2
votes
0answers
13 views
Formatting SD card on chromebook [closed]
I cannot reformat a SanDisk SD card using an acer cb3-131 chromebook. Is there a chrome stack I should ask this question in?
What happens is an error which says this ....
I think SanDisk cards ...
5
votes
2answers
457 views
Largest allowed maximum number of open files in Linux
Is there a (technical or practical) limit to how large you can configure the maximum number of open files in Linux? Are there some adverse effects if you configure it to a very large number (say 1-...
1
vote
1answer
31 views
How to record filesystem operations history?
Is it possible to record recent files operation? By operations i mean moving, renaming, deleting, creating etc. Not full log with seeks and stuff.
0
votes
3answers
80 views
What is a flat file?
Is it a plain text file or binary file or just character file? Can someone explain what a flat file actually means?
0
votes
1answer
32 views
Find of symbolic links point to the same target [duplicate]
How can I find all of the symbolic links in a directory, that point to the same target?
For example, here is a list files in a directory:
a.txt
b.txt
a -> target1
c -> target1
m -> target2
...
-1
votes
1answer
37 views
Are there superset/subset relations between the sets of permissions of user owner, work group and other for a file?
Unix files have two kinds of ownership: user and group, each with its
own permissions. Normally, the owner of a file should have full
access to it, whereas members of a work group to which the ...
0
votes
2answers
38 views
How to copy files of particular date from one path to another path in Unix [closed]
I want to copy a files of particular date from one directory to another directory. Can anyone suggest me the Unix command for that ?
3
votes
4answers
76 views
Bash: Path or link to a line in a file?
/path/to/fname#line1242
Is there a way to refer to a specific line number in a file as part of the pathname, or some way to package a link to a line number, which looks/behaves like a pathname? For ...
1
vote
2answers
33 views
recursively mark all files in a directory as modified without changing file content
I am on a system which deletes files which haven't been modified in 30 days. I need some way to preserve important files by marking them as being recently modifed. What is the best way I can do this? ...
0
votes
1answer
74 views
Replacing one column with another column in csv files [duplicate]
I have a file1 with the following:
1,joe,jim,bob,sally,mark,sue,etc,etc
2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc
1,clarie,mike,joe,jim,bob,sally,,etc,etc
2,matt,alivia,joe,jim,bob,mark,sue,...
-1
votes
0answers
33 views
Moving file from ssh to file manager or FTP
I recently bought self managed dedicated server hosting.
i urged the company to move my file from my current hosting to the new dedicated and they did it but they said the file is in SSH and i need to ...
2
votes
1answer
33 views
Changing Firefox's Open Containing Folder action [duplicate]
I've just installed Enlightenment on my Mint desktop and am loving it. But when I download something from Firefox, then click on "open Containing Folder" (in the Firefox download menu) the entire ...
0
votes
3answers
33 views
How do I check if either or both of the two files exist?
How can I check, in shell script, if any of two files exist?
It doesn't matter which of the two files exist or if they both exist.
3
votes
3answers
118 views
How to sort file names in numerical order AND modified time order?
I want to join pdf files by pdfjoin/pdfunite/... in the numerical order discussed well in the thread answer linux command merge pdf files with numerical sort and Modified time order.
If you use the ...
1
vote
2answers
76 views
Linux `size` command gives different results from `ls`
I have an executable i build on Ubuntu 16.04. The file size shown on the GUI and through the ls -l command is:
-rwxrwxr-x 1 alibivmuser alibivmuser 19108760 dic 20 15:49 NreSpeechApplication
And I ...
0
votes
1answer
19 views
Cannot execute script after installing SELinux
I have script in /home/ubuntu/bin/ which I have added to the PATH variable.
After installing SeLinux and enabling it in permissive mode it (SELINUX=permissive in/etc/selinux/config`), I am unable to ...
0
votes
0answers
19 views
Search for all error_log files on server (excluding `virtfs`) [duplicate]
I have seen a few error_log files on the server that have grown really large. I am thinking that many apps need to have the logs purged to be current and free up space.
How can I search for all files ...
3
votes
0answers
56 views
Replace files with specific last modified date with files (or dates) from archive
I had a hard drive nearing capacity (mostly /home). I installed a new larger drive, copied /home over to it and went on with my life.
This was on 5/17/2013. I know it was on 5/17/2013 because I ...
6
votes
3answers
95 views
mass decompress gzip files without gz extension
I have a massive number of files with extensions like .0_1234 .0_4213 and .0_4132 etc. Some of these are gzip compressed and some are raw email. I need to determine which are compressed files, ...
0
votes
2answers
34 views
Recover specific files from deleted EXT4 partition
Is there any way to recover a few specific files from a deleted EXT4 partition. I deleted all partitions on my 480GB SSD. Afterwards, I created a 200 GB NTFS partition (which is mostly empty) and I ...
0
votes
1answer
34 views
Required permission to create directory
I'm trying to create a sub directory under existing directory tree. I want to know if only the permissions of directory where I'll be creating my sub directory matter or the parent directories will ...
26
votes
5answers
245 views
Replace file with hard link to /dev/null
I'm running an application that writes to log.txt. The app was updated to a new version, making the supported plugins no longer compatible. It forces an enormous amount of errors into log.txt and does ...
3
votes
1answer
63 views
Check if a file is opened by another process
Is there a way to check if a file with given name is opened by some process (other than our process)?
I need this on FreeBSD. It would be nice to also support Linux. I write in Perl.
Techniques ...
1
vote
2answers
68 views
copy files to a new name - shortest way
In a directory, I have about 150 files with a certain extension, for example:
abc.ext
def.ext
ghi.ext
...
Now I want to copy all of these files also to a new filename (without extension):
abc
def
...
3
votes
3answers
52 views
Recursively rename files while retaining all characters preceding an underscore
I've got a need to recursively rename several thousand files on a CentOS 7 machine currently in the format of:
(32-64 alphanumerics)_various special characters.wav
In short, I would like to ...
1
vote
2answers
45 views
Monitor accesses to directory on a Linux machine [duplicate]
How would you monitor a directory on a Linux machine to check if there was a user (or someone from the network) who attempted to access it?
2
votes
2answers
78 views
How can I use the find command to list all the file types in a directory and all subdirectories? [duplicate]
How can I use the find command to recursively list all the file extensions in a directory? Using wildcards I can find all the files of a certain type:
find . -iname '*.mp3'
but what I want to to ...
0
votes
2answers
60 views
Print files in reverse order from an associative array in bash
for key in ${!current_file[@]}
do
echo $key
done
I declare current_file like below in bash:
declare -A current_file
insert key as a file and size as value in current_file. ...
-1
votes
1answer
63 views
Convert character encoding to UTF-8 in a .csv file
When I export my LinkedIn connections from:
https://www.linkedin.com/connected/manage_sources
I get a Microsoft Outlook CSV file back.
But when I try to CSV.read the file using Ruby I get the ...
0
votes
1answer
627 views
Cannot remove file: “Structure needs cleaning”
I have an external hard drive which is encrypted via LUKS. It contains an ext4 fs.
I just got an error from rsync for a file which is located on this drive:
rsync: readlink_stat("/home/some/dir/...
0
votes
2answers
45 views
Bash if based on grep result gives “too many arguments” error?
So I am trying to tell if the machine has a battery, then run different commands based on whether or not it does. Here's what I have so far:
upower -d >> /tmp/batstat
if [ grep -F BAT0 /tmp/...
1
vote
1answer
35 views
How to encrypt the ffmpeg output when generating video chunks?
I can openssl encrypt a ffmpeg video stream with
ffmpeg -i video1.mp4-video1.mp4.mp4 -f ogg - |
openssl enc -des3 > outptu.ogg.des3
Which strategy would you use to encrypt the ffmpeg output ...
-1
votes
2answers
52 views
Extract highest day from time-stamp date within a filename
filename is structured as name$timestamp.extension where:
timestamp=`date "+%Y%m%d-%H%M%S"`
So, if there are following files in a directory:
name161214-082211.gz
name161202-082211.gz
name161220-...