why Inode number is different from computer to computer [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I made a folder and file in it (in linux) and then I used the following command to get the Inode number of each file and directory:
ls -i -R
but when I use another computer with the same task I get different numbers for each inode, I know that it is reasonable but can everyone explain the reason of that? I mean why is the results different from computer to computer?

An inode (or index node) is a pointer/identifier used within the internal data-structure of a filesystem.
As such, different computers have different filesystems - talking about the data, not the type/implementation! - and thus have different inodes values for a resource. An inode is an internal identifier while the path is the external identifier.
As an analogy, imagine a C program in a modern operating system that mallocs a new object. The malloc returns a unique pointer within the process. However, many processes can share the same pointer value (when viewed as an integer address) while referring to completely unrelated objects.

Related

What is the "1" in this column "drwxr-xr-x 1 bash bash 4.0K Dec ..." [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I read that "1" is the number of hard links to the specific file, but what exactly are hard links?
In computing, a hard link is a directory entry that associates a name
with a file on a file system. All directory-based file systems must
have at least one hard link giving the original name for each file.
The term “hard link” is usually only used in file systems that allow
more than one hard link for the same file.

Monitoring /sys/block/*/device/ioerr_cnt, what are typical error rates? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am attempting to monitor /sys/block/*/device/ioerr_cnt for disks that are about to fail. I am seeing healthy disks reporting some errors, as well.
What are typical thresholds to distinguish between disk drives operating normally, and those about to fail? Are there best practices in this area?
Here's a good discussion on ioerr_cnt
It's not a good indicator of drive failure since it's really an indicator of how the drive is responding to commands, not how the actual drive hardware is doing. SMART capable drives, for example, remap bad blocks internally and this may not show up in ioerr_cnt.
Your best bet would be to query the drive (if it is SMART capable), since it keeps track of actual error rates and remapped blocks.

Join AVCHD .mts files on linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a Lumix camera which, like most new cameras, record video in AVCHD format. The files get segmented into 2 or 4 GiB segments because of the limitations of the filesystem used on the memory card.
When I transfer the files to my linux computer to edit them I naturally want to have each video in a single file, which is no problem at all for linux's filesystems. So, how can I losslessly join these segments, maintaining a/v-sync?
(With Avidemux 2.6.8 I can append these segments, but it leads to nasty distortions at the cut point.)
The solution, which seems to work with my files at least, turned out to be very simple:
ffmpeg -i "concat:00000.MTS|00001.MTS|00002.MTS" -c copy output.mts
One still has to figure out which of the files belong together, though.

How does mv compare to cp in terms of speed and safety when the transfer is across different filesystems? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
By safety I mean if the transfer gets interrupted, how does that impact the data in both source and dest? Is it also dependent on the specific types of filesystems?
When working across filesystems mv really has no choice but copying the file, in effect doing whatever cp does and then unlinking the original file.
A simple strace shows this:
rename("/tmp/file.rand", "./file.rand") = -1 EXDEV (Invalid cross-device link)
^^^^^^^^^^^^^^^^^^^
After this point mv reads 65536 bytes at a time from one fd and writes them to the other and does an unlinkat at the end.

Is there something like USN Journal on Linux filesystem? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I often use Everything (a search tool) on Windows. It uses USN Journal to speed file name search.
Do Linux filesystems (ext4, xfs, btrfs, etc.) have a similar function to USN Journal?
The USN journal lets a Windows program keep track of changes to files.
An program on Linux can do the same by using inotify. It allows a program to be notified about every change to the files.
It is not a function of any particular filesystem, but of the kernel's filesystem layer, so it works with any filesystem.

Resources