Tag Info

New answers tagged

0

The PHP documentation sucks is very bad: vague, ambiguous, and misleading.  fileinode() is tersely defined as “gets file inode” or “returns the inode”.  But if you dig a little deeper, the documentation seems to start saying that this function returns the inode number.  An inode is more than an inode number.  The difference between “returning the inode of a ...


1

You can't use inode to check if a file has been changed. It may or may not change when a file is renamed, or moved. It will typically stay the same unless moved onto another disk ...


-1

An inode used to be the on-disk structure that contained access permissions, ownership, size in bytes, and the disk block numbers of the disk blocks that contained a file's data. So, some metadata, and some data. The file's name was just an entry in a specially-marked file, called a "directory". The name was associated with the "inode number". ...


2

A file rename that doesn't cross file system boundaries is just a metadata change, so it should preserve the inode number. Generally speaking, opening a file and modifying its contents should not change its inode number, which only makes sense within a single file system anyway (but it will change the access times, for example). Note that some tools such as ...


1

It is impossible to dissociate the contents of the file from the inode which contains the file's metadata (timestamps, owner, permissions, etc.). Most metadata would be problematic if there was more than one set: not just the size (which obviously needs to match the content), but the modification time (which would have to be updated in every inode when the ...


1

A gpg solution would be to decrypt a file to standard output, and pipe it to your program. This requires the program to read for stdin, which may not be the case. I made an alias for this on my system: $ gpg -q --output - $ alias gpgcat='gpg -q --output -' Then... $ gpgcat encryptedfile.gpg | ./myprogram From user236012's comment, you could write the ...


0

You can use mhddfs instead lvm as if one disk is failed then only data on that disk will be lost. It runs on user space using fuse modules but I'm using it for very heavy load infrastructure [root@storagenode1 ~]# df -hl Filesystem Size Used Avail Use% Mounted on /dev/sdl2 259G 2.1G 244G 1% / tmpfs 48G 0 ...


1

For Ext4 a hard-link simply refers to an inode, which contains all the metadata. Therefore you cannot have different metadata using hard links. I'm not sure what exactly you are trying to do, but you could have a look at git, zip, or soft-links. All of them have ways of handling duplicated data.


0

My final solution was to 1] Fix the apt-get by replacing the actual file which it said was in error (libapt-pkg.so.4.11.0) by a copy downloaded from the internet. This fixed apt-get to my great surprise. I was expecting followup errors. 2] Now that the apt-get was working, I was able to do do-dist-upgrade and replace pretty much all the packages in the ...


1

That looks like file system corruption to me; to fix it, do sudo touch /forcefsck and reboot. This will force a fsck of your file systems.


3

Depends on what you're after. If you want to check which of the partitions in /dev/sd* has a default mountpoint and what that mountpoint is, you could do for part in /dev/sd*; do grep -w "$part" /etc/fstab | awk '{print $1,$2}; done However, on most modern systems, partitions are mounted by UUID and not dev name, so a better approach1 would be: for uuid ...


6

Another approach is with findmnt: findmnt /dev/sda4 ...to get mountpoint from dev. Or vice-versa: findmnt /home


3

You're actually asking two questions. The easiest thing to do if you want to know where your home is: cd df -h . Or df -h $HOME Where is /tmp mounted? df -h /tmp ...etc. If you want to know what is mounted on a certain device, mount | grep ^/dev/sda1 (for example). Or mount | grep ^/dev/sd to see all the sd's.


6

You can use: mount for a list of all mounted filesystems and mount options for each of them; lsblk for a tree of block devices, size and mount point (if mounted); df for a list of mounted block devices, size, used space, available space and mount point.


2

You can use mount command. It also shows options with which the mounting is done.


2

You're looking for the df command.


1

These different segfaults are more likely an indication of something wrong with memory or with your disc connection than with corruption of the filesystem. You should first check the memory by rebooting and selecting the memory checker from the grub menu and let it run at least for one pass. Re-seat the memory (after switching of the power) and retry if ...


1

The smallest possible allocation size for a file in ext3/ext4 is 0 (none at all) because of inline data: files with sizes smaller than 60 bytes can be stores completely inside the inode itself. Of course, every file, whether it's a regular file, symlink, directory (which can contain data), or character device or block device or named pipe (none of which ...


0

You have several deviced that are logically organized under the /dev directory, for harddisks (e.g.) /dev/sda, or partitions like /dev/sda1. In Unix those individual devices are mapped into a filesystem hierarchy; all starts with a root directory /, and under that are the subdirectories. To map the individual devices into that hierarchy you mount it; for ...


0

You can use locate command and if you want update its database run the following command: # updatedb This command update the locate database in a few seconds


1

No, not really. You can test the by debug tracing your operation. Assuming you're on linux, that's strace. mkdir test1 ln -s test1 test2 strace -o strace1.log ls -l test1 strace -o strace2.log ls -l test2 Then diff your two logs. You'll see they're basically the same sequence of operations. They call lstat which is a version of stat that follows ...


1

You should try out inotifywait, from the [inotify-tools][1] package, if you're using Linux. A command like this: inotifywait -m -r $HOME running in an xterm should give you an idea of what's going on. It looks like "what application does the actions" is not available, however.


1

If you are using Linux, this sounds like a job for fatrace (which uses the fanotify API). Here is some sample output: sh(28980): C /bin/bash cron(28974): CW /tmp/tmpf807Y78 (deleted) cron(28974): C /lib/x86_64-linux-gnu/security/pam_unix.so cron(28974): C /lib/x86_64-linux-gnu/libcrypt-2.13.so cron(28974): C /lib/x86_64-linux-gnu/security/pam_deny.so This ...


3

Part I: File system layout Create a Raid1-array out of the 2x640GB (mdadm) and format the array with, e.g., ext4 (You loose all data on those drives!). Format the 60GB SSD with, e.g., ext4 (You loose all data on this drive!). Adapt /etc/fstab on the ubuntu drive: Add two entries for the array and the 60GB SSD. It depends on your flavor to mount the array ...


2

May be you want to use mdadm $ losetup --readonly /dev/loop1 diskimage.part1 $ losetup --readonly /dev/loop2 diskimage.part2 $ mdadm --create /dev/md0 --level=linear --raid-devices=2 /dev/loop1 /dev/loop2 $ mount -o ro /dev/md0 /tmp/mountpoint


0

In case there's at least enough free space for diskimage and diskimage2 you could append the latter to the former file cat diskimage.part2 >> diskimage.part1 && mv diskimage.part1 diskimage It will also be faster than copying both because you need not move that many data. But using another fast device for the concatenation is preferable ...


0

According to ceph documents,they recommend configuring Ceph to use the XFS file system in the near term, and btrfs in the long term once it is stable enough for production and at the end, ext4. document 1 document 2 document 3


3

The /dev tree contains device nodes, which gives user space access to the device drivers in your OS's running kernel.¹ All POSIX type OSes have a /dev tree. The /proc tree originated in System V Unix, where it only gave information about each running process, using a /proc/$PID/stuff scheme. Linux greatly extended that, adding all sorts of information about ...


1

Just for reference, since you pretty much answer your question yourself... On Mac OS X /tmp is a symlink to /private/tmp. Both are owned by root:wheel; /tmp has mode 0755, /private/tmp has mode 1777. There is no tmpfs-style filesystem involved. As terdon says, if the Finder gets confused, restarting it (or rebooting) should fix things. But even without ...


0

I ran a small benchmark on a directory of cloned repos -- lots of little files. Here are parameters: 17002 files 4.9G 46 root directories tar command: tar cf (no compression) rsync command: rsync -aH --delete --stats And the results: Local rsync to an empty directory (unpacked files): real 5m36.447s user 0m34.692s sys 0m56.390s Second ...


0

Rsync needs to check all those files and folders each time. That takes up time, performance and network load. If you put each project in a tarball that means one file check instead of thousands checks. It saves space as well.


1

Archiving old directories that you rarely access as tarballs can definitely improve the performance of a file-based backup system. I wonder, is this a documented phenomenon (benchmarks?) It's not really a "documented phenomenom" so much as a natural consequence of having to scan the filesystem and examine each file one by one to determine whether it ...


10

The ~/SDRIVE directory is mounted as a fuse filesystem which means that the filesystem operations are handled by some userspace program, not by the kernel. Those errors are coming from the filesystem implementation, which could be anything at all and is probably some kind of site-custom software. This is one of those times where you're probably going to ...


0

I pretty much had the same issue, trying to mount gave: $sudo mount /dev/sda2 ./oldfs/ mount: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so I tried the above mentioned re-writing of the part-table, without success. ...


1

Not everything about the file, most of the metadata about the file is stored within the file inode, not the directory entry. The directory entry is just a struct of inode and filename - just enough information to translate from a filename to an inode and get to the actual file. You can safely imagine a directory as a dictionary: filename1 :> inode1 ...


1

The best resistance against corruption on a single SD card would be offered by BTRFS in RAID1 mode with automatic scrub run every predefined period of time. The benefits: retaining ability to RW to the filesystem modern, fully featured filesystem with very useful options for an RPi, like transparent compression and snapshots designed with flash memory in ...


0

i also don't read necessary to set up chroots . to prevent from go up parent directories , assign a strict permission . $ mkdir --parent 1/2/3 $ ls 1 2 $ chmod 100 1 $ ls 1 ls: cannot open directory 1: Permission denied $ ls 1/2 3 if we want to grant a user acces to /home/1 but confine the user not to see what are other materials in /home we make /home ...



Top 50 recent answers are included