The files tag has no wiki summary.
1
vote
2answers
35 views
Is there some kind kind of hosts.additional file for Linux
If you have a list of servers all linking to each other by static addresses, is there some kind of hosts.additional you can use as some kind of file based DNS?
ie The hosts file contains static ...
3
votes
1answer
43 views
How to create a folder which will change its contents’ ownership to what the folder has?
In a GNU/Linux OS there is no way to change ownership of a file until you are root. But what if I want to hide my system’s username e.g. before sending a file to someone, because some things like tar ...
1
vote
2answers
52 views
File delete versus overwrite and link at /proc/pid/fd
It is well known that UNIX systems won't actually delete a file on disk while the file is in use. So if a file is being accessed by process 1 and process 2 deletes the file using rm, process 1 ...
5
votes
3answers
57 views
Can a file that was originally sparse and expanded be made re-sparse
I know that copying or transferring what was originally a sparse file without using a utility that understands sparse files will cause the 'holes' to be filled out. Is there a method or utility to ...
2
votes
2answers
41 views
linux disk caching affects access times reported by stat?
On Ubuntu 12.04 I did the following
stat a file
cat the same file
stat the file again
cat the file again after 5 min
stat the file
The access time reported at 3. reflects the point at which 2. was ...
2
votes
2answers
80 views
Fastest way to get list of all file sizes
I'm trying to create a graph of the distribution of file sizes on my ext4 system. I'm trying to write a script to scrape this information from my computer somehow. I don't care where the files are ...
4
votes
3answers
58 views
Can't read a file although it's in my group and permissions for group read are set
I encounter a strange problem on a unix/linux machine:
I'm member of a group, let's call it group A and a certain file (which has a different owner) belongs to group A as well. The permissions of ...
3
votes
1answer
47 views
How to rename all files and add image size to file name
I can`t make this work. I have a lot of images and i want to rename his name and append image size to name using exiv2
eviv2 pr * prints all info about file
# exiv2 pr 9b523e5a002268fe5067a928
File ...
0
votes
1answer
38 views
Finding files created 1 hour before or after a particular file [closed]
Possible Duplicate:
How to list files that were changed in a certain range of time?
Finding files created 1 hour before or 1 hour after a particular file (for example fileX) has been ...
1
vote
5answers
67 views
Run a command on all the files in a directory tree and put the output into a variable
I want to run this bash command :
#!/bin/bash
rep="*"
for f in `ls -R`$rep; do
d='git log '$f'| wc -l'
c=$d
echo $c
done
how to excute a command git log myFile | wc -l from bash ?
ps : this ...
3
votes
2answers
67 views
List files created on Sundays
How do I list/find all the files created on Sundays or Mondays?
How do I use the date parameter to display them?
Something like :
ls -f date + %a
or
find -type f | date +%A
or
find -type f ...
3
votes
2answers
70 views
How can i redirect the output to a file when the program is build with ncurses library [closed]
Possible Duplicate:
Removing control chars (including console codes / colours) from script output
If we redirect output to file in this pattern top >> somefile.txt, we get lot of ...
7
votes
3answers
320 views
What happens when you delete a hard link?
If you do rm myFile where myFile is a hard link, what happens?
1
vote
3answers
75 views
Deleting the starting 10 MB from a open file
I have a log file of size nearly 100 MB which is opened by some program and logging is continuously going on in that file. I want to delete the first 10MB from that file. Is there any way to do that ...
1
vote
5answers
78 views
ls: Do not show directories that match same pattern in wildcard searches, only files
Supposing I have something like the following, a typical business PC situation:
drwxr-xr-x 1 whatever whoever 3 Oct 3 16:40 invoices2009
drwxr-xr-x 1 whatever whoever 4 Oct 3 16:40 ...