1
vote
1answer
80 views

File has bytes - appears to be empty

I'm having the following problem: Some text files (also some binary files) on my system are listed with the correct file size but when I open them, they appear empty. >ls -la -rw-rw-r-- 1 user ...
13
votes
2answers
385 views

Is that possible to integrate zip and tar.gz files as directory into the file system

I wonder if there is a way to integrate (it's a bit different from mounting, I think) compressed files as directories into the file system? E.g., one could download a compressed-file.tar.gz to his ...
2
votes
1answer
45 views

How to link the unlinked files?

When you rm a file it will call unlink(), and unlink() will remove the file from the Directory entry and its inode is freed. But, the actual content of the file is still in the disk. Is there any way ...
4
votes
3answers
115 views

Hidden Files&Directories in user's home directory [closed]

I am in my user's home directory, I do: ls -a Then it shows me large number of hidden files and directories in my user's directory. Which of them I am allowed to remove? Which ones are necessary ...
5
votes
1answer
104 views

Cannot delete broken symbolic link

I have a symbolic link formerly pointing to a Dropbox directory. I don't know what I did wrong, but apparently now it points to itself. hyper@mypi:/home/hyper/test$ ls -l total 1024 lrwxrwxrwx 1 ...
2
votes
1answer
36 views

Ignore file changes

I have a process, which generates a file with configuration data and then calls a subprocess with this data as parameter. I'd like to override the configuration data, which is passed. The problem is, ...
3
votes
0answers
45 views

How does fsnotify setting affect system performance?

Occasionally a software package I install complains that the default fsnotify setting is far too low for decent performance. Intellij IDEA or crashplan are two examples. They suggest using fsnotify ...
1
vote
2answers
50 views

Something like a symbolically linked file, but with change details attached?

Is there a file type or method for using files in which certain files look and behave like symbolically linked files, but contain extra meta information for changing the data when they are read? ...
3
votes
1answer
42 views

Where are information stored information about hard/soft links

Where does the *nix system store information about number of hard links to a specific inode? I can't find any information about that. Everywhere what a hard link is but rarely a bit more advanced ...
6
votes
5answers
741 views

How does one find out how many bits a file has in one command?

I know I can use ls -lat to find out how many bytes has a file and then multiply by 8 to find out how many bits. But is this possible in only one command line?
1
vote
1answer
60 views

Monitor file access count by user

I have written a script which is deployed just by putting it in a globally accessible location for all users. I want to log the usage of this script. Is there a way in Linux to find out how many ...
2
votes
1answer
143 views

How to Free Up Space in a Dynamically Growing qcow2 VM image?

This has happened to one of my VM's that's running CentOS under Proxmox. I copied about 40 GB of data into a VM. I then deleted that 40 GB data a day later. Now taking a backup of the same VM takes ...
2
votes
3answers
148 views

What command do I use to see the start and end block of a file in the file system?

Is there any command that will output the beginning and ending blocks of any file?
2
votes
2answers
78 views

What are the differences between split and rar?

I am used to raring files -- but I am looking for something faster. I see that there is a "split" command. How does this command compare to rar? What is are the differences between split and rar?
5
votes
2answers
389 views

Why are 666 the default file creation permissions?

As I've found out, when using umask, the highest permissions you can give to files are 666. Which is done by umask 0000. That's because of the default file creation permissions, which appear to be 666 ...
2
votes
1answer
139 views

Hang during 'touch' operation on NFS mount

I have two NFS clients mounted to an openfiler 2.99 NFS share at 192.0.2.3: 192.0.2.1 mounts 192.0.2.3:/mnt/nfs01/volnfs01/share01 with ...
5
votes
2answers
179 views

A virtual file containing the concatenation of other files

Is there a way of creating a filesystem object akin to this: mknod files p cat file1 file2 ... fileN > files but such that it can be seeked in, as if it were a regular file?
3
votes
3answers
993 views

How can I change the date modified of a folder to the last changed file inside? [duplicate]

In my media center directory all modified times of my folders are somehow not the desired date. How can I change all modified times of the main folders to the modified time of the newest media-file ...
2
votes
2answers
630 views

Finding sparse files?

Is there a straightforward way to find all the sparse files on my system, or in a particular directory tree? If it's relevant, I'm using zsh on Ubuntu 12.04, although a more generic Unix-y answer for ...
2
votes
2answers
153 views

Symbolic link of for my user, doesn't work for root

I am experimenting with the following scheme in order to share common data among different distributions. In Fedora I have created a symbolic link /home pointing to: ...
4
votes
2answers
89 views

When I move a file to a different directory on the same partition, does the file's data actually move on disk?

I could see it going both ways. If the filesystem stores it's directory structure and list of files in each directory, and then points to the disk location of each of the files, it shouldn't require ...
3
votes
2answers
102 views

How to make directory modication date change when files from that dir change?

For example, if a file has been changed in that directory, then directory modification date should be updated. Basically any changes that happen in that directory should trigger a "touch" on the ...
28
votes
4answers
837 views

Append huge files to each other without copying them

There are 5 huge files ( file1, file2, .. file5) about 10G each and extremely low free space left on the disk and I need to concatenate all this files into one. There is no need to keep original ...
3
votes
2answers
126 views

Determining if a file system object is a procfs/sysfs/etc. “virtual file” which doesn't report its length correctly

Some kinds of pseudo-files, like many in the procfs and sysfs virtual file systems, have no file size (stat returns st_size == 0) and do not support SEEK_END in fseek. These file system objects, such ...
2
votes
3answers
106 views

determine user-modified files

I plan to reinstall my operating system since I messed up some stuff. Access to files and folders is painfully slow sometimes, even if they contain just a few files. But of course, I don't want to do ...
0
votes
1answer
88 views

What disk is a file / directory stored on? [duplicate]

From the command line (bash) I would like to know what disk a given file is stored in. E.G.: $ [what filesystem is this file in command] /tmp/example/file /dev/sda1
1
vote
2answers
136 views

How can find support large files?

I would like to find all the files of my system, which sizes are more than a couple gigabits. I thought I would use find -size, but the man page states: The size does not count indirect blocks ...
3
votes
2answers
65 views

Test if a file is on NFS?

Is there a simple test to determine if a file is on an NFS mount? (Or maybe more generally, what type of filesystem a file lives on?) I am imagining some ugly prefix matching against fstab...
2
votes
2answers
556 views

How does Linux know the Location of File Data on Disk

related to: What is a Superblock, Inode, Dentry and a File? None of the famous metadata structures hold onto to location data for the actual file. Dentry maps names to inodes, and inodes store ...
4
votes
2answers
654 views

How to upgrade shared library without crash?

Here it says that you can rewrite an executable file and the process will run just fine - it will be re-read when a process restarts. However, when I try to replace a binary file while the process is ...
3
votes
2answers
298 views

How can I backup a directory to NTFS while preserving Unix file attributes?

I want to make a backup of my home directory to an NTFS partition (an unfortunate limitation). However, when I last tried using just cp, the attributes (owner, etc) went away. How can I make a backup ...
1
vote
4answers
71 views

Is there a robust way to cache contents of usb on local hd?

I'd like to switch between working on a laptop with a debian vm and a desktop pc running debian while carrying all my work files in a usb. Is there a robust way to automatically start caching the ...
0
votes
1answer
215 views

how are directories implemented in UNIX filesystem?

This question is extension to How are directories implemented in Unix filesystems? I'm aiming to implement basic filesystem: After reading inode number and name we come to know Name of file and hence ...
1
vote
2answers
275 views

Cannot access any files Manjaro Linux

I cannot open any files on my Manjaro Linux laptop. I really can't remember why it happened but I restarted my computer and now I dont have read/write access to any folder or file even though I've ...
0
votes
1answer
553 views

Log4j File Location

I have a Webapp running on an Amazon EC2 Linux AMI. I've been trying to configure my Log4J file for logging but haven't been able to figure out where the logs are getting created. This is my log4j ...
0
votes
1answer
101 views

Debian VirtualBox Guest - Common Files to Remove for Space Saving?

I have created a VirtualBox guest using debian-6.0.7-amd64. I am using it as a clone template to create Java work nodes, so my needs are pretty much limited to the JVM, networking, SSH and the basics ...
3
votes
3answers
143 views

How to prohibit from changing an owner of modifiable files?

I sometimes need to run a Qt Creator from root. After that, some config files of Qt Creator suddenly have a root as an owner. Therefore when running Qt Creator as user, I am getting nag warnings about ...
2
votes
2answers
450 views

dynamic file system with hooks

Is there anyway in linux (I don't care which distribution or flavor) to have a dynamic file system with read/write hooks? For example I would like to mount a dynamic file system at /dynamic and ...
3
votes
1answer
47 views

Emulating a file

I have certain application that opens a file with given path (presumably with fopen or derivative), reads the file, possibly writes to it and closes it. I have no control over this application other ...
2
votes
2answers
59 views

Download copy of file which updates on change

Sorry about the title, I didn't know how to write it - It's kind of confusing. Ok, I am using my Raspberry Pi (Debian) and I store code on this server in which people have access to. My problem at ...
1
vote
1answer
71 views

How do I give global access to a file in a private folder?

For example, I want all the files in /home/trusktr/Downloads/ to remain hidden from other users, except for one. I tried chmod 777 /home/trusktr/Downloads/someFile.avi but someFile.avi is still ...
2
votes
2answers
80 views

'tie' [nonexisting] files to programs

Recently, I just had an idea which turned out to be pretty useful under certain circumstances. But first some simple explanation: In Perl, you have the option to tie variables to some functions ...
4
votes
1answer
500 views

Removing files that do not exist

I apologize for the possibly misleading title, but it is the best way I could think of to describe the problem, which is: I have several files that I can cat, but when I try to rm them I get a "No ...
1
vote
1answer
419 views

Trigger action each time a file is modified [duplicate]

Possible Duplicate: Can a bash script be hooked to a file? Is it possible to mount a mechanism to a file to perform an action (e.g. mark the change in some log file and such) each time the ...
2
votes
1answer
706 views

Sphinx Search shutting down after `FATAL: accept() failed: Too many open files`

I'm running Sphinx Search Server V2.06 ( the latest stable release ) on an Amazon EC2 with Linux CentOS. In general it is running fine, but the searchd.log is showing this error over and over with ...
1
vote
1answer
915 views

cannot 'ls' /mnt directory

I have a CentOS-6 machine that I'm working on that is running a live database. It's having a problem with the /mnt directory. I cannot ls the directory for some reason. stat is working and shows ...
15
votes
2answers
4k views

What happens when you delete a hard link?

If you do rm myFile where myFile is a hard link, what happens?
3
votes
3answers
275 views

Why do I get 3048 MB from a 64 MB flash memory?

I have a Linux based STB (set-top-box) and it features a 64 MB flash memory and 256 MB of RAM. I wanted to take a backup of some of my settings before I flash it with another image, but I wasn't sure ...
2
votes
1answer
266 views

referring to files inside a jar or zip files in Linux

I am wondering if I can refer to files inside JAR or ZIP files using URLs. I mean, without using a tool (such as the Java Jar utility) but just at the operative system level. For example, if I have a ...
3
votes
1answer
269 views

How does the Linux file structure work?

I see the different folders bin, dev, mnt, proc, srv, sys, etc. What are the properties of all these different folders? What are there purposes? Are there files in some of them that I should not ...