Reputation
497
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 7
Newest
 Necromancer
Impact
~35k people reached

  • 0 posts edited
  • 0 helpful flags
  • 47 votes cast
May
17
awarded  Necromancer
May
7
revised How to create an uncompressed AVI from a series of 1000's of PNG images using FFMPEG
Warren Young got his answer un-community-wikied. Also updated my tl;dr summary
Apr
21
comment How can you see the actual hard link by ls?
turned that idea into an answer
Apr
21
comment How can you see the actual hard link by ls?
turned that into an answer
Apr
21
answered How can you see the actual hard link by ls?
Apr
21
comment How can you see the actual hard link by ls?
If you just want groups of hardlinks, rather than repeated with each member as the "master", use find ... -xdev -type f -links +1 -printf '%16i %p\n' | sort -n | uniq -w 16 --all-repeated=separate. This is MUCH faster, as it only traverses the fs once. For multiple FSes at once, you'd need to prefix the the inode numbers with a FS id. Maybe with find -exec stat... -printf ...
Apr
21
comment How can you see the actual hard link by ls?
also, that find-all-links idea is O(n^2), and runs find once for each member of a set of hardlinked files. find ... -printf '%16i %p\n' | sort -n | uniq -w 16 --all-repeated=separate would work, (16 isn't wide enough for a decimal representation of 2^63-1, so when your XFS filesystem is big enough to have inode numbers that high, watch out)
Apr
21
comment How can you see the actual hard link by ls?
The . and .. entries in directories are hardlinks. You can tell how many subdirs are in a directory from the link count of .. This is moot anyway, since find -samefile . still won't print any subdir/.. output. find (at least the GNU version) seems to be hardcoded to ignore .., even with -noleaf.
Apr
21
comment How can you see the actual hard link by ls?
Hard links aren't pointers, symlinks are. They're multiple names for the same file (inode). After a link(2) system call, there's no sense in which one is the original and one is the link. This is why, as the answers point out, the only way to find all the links is find / -samefile /a/A. Because one directory entry for an inode doesn't "know about" other directory entries for the same inode. All they do is refcount the inode so it can be deleted when the last name for it is unlink(2)ed. (This is the "link count" in ls output).
Apr
19
comment Strip motion events from file
Yup, the default setting of -vsync is 2 for mkv, but something else for mp4, because of a bug in a corner case for mp4. -vsync 2 normally works with mp4, to make VFR output.
Mar
28
comment Connect USB storage device to 2 computers at a time
@kruug Storage that can be accessed from multiple machines in parallel is usually used with a en.wikipedia.org/wiki/Clustered_file_system. E.g. GFS or Lustre. I think all implementations require a communication channel separate from the storage itself, (usually IP over ethernet) for the hosts coordinate who's going to write where. Anyway, I doubt there are any multiple-writer USB storage devices, so this doesn't help :/ Clearly your Raspberry Pi is in need of Fibre Channel :P
Mar
28
comment Which CPUs support TSX, with the erratum fixed?
Neither of the two pages I found mentioned the other, so that's why I wanted to collect things in one place.
Mar
28
comment Which CPUs support TSX, with the erratum fixed?
Yes, that's why I'm asking. Is there a different stackexchange site that's more appropriate? Should I edit my question to take out the ones I've found so far, and move that to an answer? I'm asking because I don't 100% trust what I've found so far, and I haven't found any authoritative info on when new steppings of existings chips might come out, or already are out.
Mar
27
asked Which CPUs support TSX, with the erratum fixed?
Mar
25
comment How do I tell if my Memory is ECC or Non-ECC?
I don't have access to any ECC-equipped servers anymore, but I'd look for a kernel log message about it. Maybe there isn't one. There's a link to something about it on buttersideup.com (best domain name ever for a project, IMO).
Mar
25
comment How do I tell if my Memory is ECC or Non-ECC?
dmidecode is standard on Linux, too. I think error correction will happen by default with ECC RAM installed, but if your kernel is monitoring the memory controller to track the memory error rate, that would be another confirmation that you have ECC RAM. (check the kernel log.)
Mar
3
comment Strip motion events from file
also, all of those filters are 1 input, 1 output. In this case, you don't actually need filter_complex, or named inputs/outputs. Just ffmpeg in.mkv -vf "mpdecimate, setpts='N/(5*TB)' -preset slow out.mkv should work. (you don't need -map, because ffmpeg maps the output of your video filtergraph by default.)
Mar
3
comment Strip motion events from file
If you use -vsync 2, you can make a VFR output file. (ffmpeg default is CFR mode for mp4, VFR for mkv). Then you shouldn't need to dup frames with the fps filter. Nice idea with using setpts to skip no-motion sections.
Mar
2
comment XFS: Mount overrides sunit and swidth options
Large stripe sizes are appropriate for most stuff these days. 512k stripe width is reasonable. I/O commands sent to hardware can be done in fairly large units, so smaller stripe sizes would tend to lead to smaller hardware commands than would be optimal. There is some old stuff on raid.wiki.kernel.org/index.php/Performance, and some of the links are dead. Small chunks for RAID5 could be justified if you have a write-heavy workload that can manage to batch requests into sequential chunks up to a certain size, but not larger. Set chunk size to make a write cover a full stripe.
Mar
2
comment XFS: Mount overrides sunit and swidth options
See raid.wiki.kernel.org/index.php/RAID_setup#XFS for how to create XFS on RAID, if auto-detection of the underlying stripe geometry didn't work.