<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.tonytascioglu.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.tonytascioglu.com/feed.php">
        <title>Tony Tascioglu Wiki - scripts:files</title>
        <description>TechnoTony Wiki - Tony Tascioglu's personal public knowledge-base!</description>
        <link>https://wiki.tonytascioglu.com/</link>
        <image rdf:resource="https://wiki.tonytascioglu.com/_media/wiki/logo.png" />
       <dc:date>2026-04-12T02:08:54+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/cannot_unmount_usb_drive?rev=1679884142"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/checksum_entire_directory?rev=1679884178"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/compress_directory_into_tarxz?rev=1679884102"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/convert_bin_cue_file_to_iso?rev=1676605083"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/create_multi_session_dvd?rev=1679884240"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/deduplication?rev=1673823314"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/evenly_split_directories_into_chunks?rev=1679884473"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/grep_through_pdf_files?rev=1673822670"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/merge_multiple_pdf_files?rev=1679884121"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/mount_dd_image?rev=1739472420"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/mount_smb_nfs_nas_share_in_fstab?rev=1649282113"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/ocr_pdf_file?rev=1679883679"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/parity_par2?rev=1735883248"/>
                <rdf:li rdf:resource="https://wiki.tonytascioglu.com/scripts/files/setting_up_luks_hard_drive?rev=1759172799"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.tonytascioglu.com/_media/wiki/logo.png">
        <title>Tony Tascioglu Wiki</title>
        <link>https://wiki.tonytascioglu.com/</link>
        <url>https://wiki.tonytascioglu.com/_media/wiki/logo.png</url>
    </image>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/cannot_unmount_usb_drive?rev=1679884142">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:29:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Cannot unmount USB drive</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/cannot_unmount_usb_drive?rev=1679884142</link>
        <description>Cannot unmount USB drive

If you try unmounting a disk as follows (wherever you mounted it)

sudo umount /run/media/username/FlashDrive


and you get an error umount: target is busy, it can be very annoying to find the process that is using something from the drive.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/checksum_entire_directory?rev=1679884178">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:29:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Checksum entire folders</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/checksum_entire_directory?rev=1679884178</link>
        <description>Checksum entire folders

Generate checksum

To generate/calculate MD5 checksums for an entire folder, we can do this recursively with find.

find -type f -exec md5sum &quot;{}&quot; + &gt; checksums.txt

This will generate the checksum for every file in the folder and save it to a text file.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/compress_directory_into_tarxz?rev=1679884102">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:28:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Compress a folder to tar.xz</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/compress_directory_into_tarxz?rev=1679884102</link>
        <description>Compress a folder to tar.xz

I came up with this BEFORE tar had the -J option to use XZ compression. This is equivalent though and will also work.

tar -cf - input/ | xz -z -k -6e -T 0 -c -vv - &gt; output.tar.xz


This will run tar on the folder to create a linear archive, then compress that with xz. -T specifies the threads, 0 will use all of them. -6e is the compression. -9 is best, -1 is fastest. Use -6e or anything with e to use more CPU cycles when compressing for marginally better ratio.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/convert_bin_cue_file_to_iso?rev=1676605083">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-17T03:38:03+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Convert .bin and .cue files into a .iso</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/convert_bin_cue_file_to_iso?rev=1676605083</link>
        <description>Convert .bin and .cue files into a .iso

I have a bunch of old family albums on DVDs (because they're old and flash drives were $$$ back then). I transferred them, but some are in .bin/.cue format since they are multitrack. I have no idea how to mount these, but I can mount .iso on Linux so I needed to convert them.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/create_multi_session_dvd?rev=1679884240">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:30:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Create multi-session DVD and burn files</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/create_multi_session_dvd?rev=1679884240</link>
        <description>Create multi-session DVD and burn files

For the odd occasion where I need a DVD for some reason, I had been using K3B. Previously, I knew how to do it with mkisofs and cdrecord, but it's kind of tedious.

Turns out you can also just use growisofs from the command line.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/deduplication?rev=1673823314">
        <dc:format>text/html</dc:format>
        <dc:date>2023-01-15T22:55:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Deduplicate Files on BTRFS</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/deduplication?rev=1673823314</link>
        <description>Deduplicate Files on BTRFS

BTRFS, ZFS, XFS, and many other file systems allow copy-on-write functionality, allowing multiple files to use the same blocks until one is updated.

These is sometimes called “reflinks”, NOT to be confused with hardlinks and symlinks/softlinks. (I'll make a video on this soon explaining the differences).</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/evenly_split_directories_into_chunks?rev=1679884473">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:34:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Evenly Split Directories Into Chunks</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/evenly_split_directories_into_chunks?rev=1679884473</link>
        <description>Evenly Split Directories Into Chunks

This is something I didn't know existed until I tried doing it manually. Basically, say you have 5000 photos to back up.

Say you want to send them to older family members with DVDs (yes, I know, optical media in 2021, give me a break).</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/grep_through_pdf_files?rev=1673822670">
        <dc:format>text/html</dc:format>
        <dc:date>2023-01-15T22:44:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Grep through PDF files</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/grep_through_pdf_files?rev=1673822670</link>
        <description>Grep through PDF files

While the normal grep utility is great to search text files, it does not work with PDF files.

This is solved by using the pdfgrep utility instead.

For example, to search for a word in a directory of PDF files:
pdfgrep -i -R -P -nn &quot;word&quot;</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/merge_multiple_pdf_files?rev=1679884121">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:28:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Merge multiple PDF's together</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/merge_multiple_pdf_files?rev=1679884121</link>
        <description>Merge multiple PDF's together

Merging multiple PDF's can be done using several programs. I used to use ImageMagick, but it can destroy the resolution. Instead, ghostscript and pdftk provide nice options.

Using pdftk:

pdfunite in1.pdf in2.pdf out.pdf</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/mount_dd_image?rev=1739472420">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-13T18:47:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>How to mount a .dd file</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/mount_dd_image?rev=1739472420</link>
        <description>How to mount a .dd file

A favourite backup tool of mine is to dd/ddrescue a drive before I reinstall stuff so I can go back to exactly how it was before.

dd however is not always friendliest to work with when you are done and need to grap say just 4 or 5 files off that old setup.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/mount_smb_nfs_nas_share_in_fstab?rev=1649282113">
        <dc:format>text/html</dc:format>
        <dc:date>2022-04-06T21:55:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Mount SMB and NFS shares for a NAS with the fstab</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/mount_smb_nfs_nas_share_in_fstab?rev=1649282113</link>
        <description>Mount SMB and NFS shares for a NAS with the fstab

Note: decide if you want a soft or hard mount. I have not included it in the below version, but it makes a big difference.

I use soft mounts for NAS mounts to avoid the case where my server is offline or I change networks just hanging applications indefinitely.</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/ocr_pdf_file?rev=1679883679">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-27T02:21:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>OCR a PDF file</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/ocr_pdf_file?rev=1679883679</link>
        <description>OCR a PDF file

Super simple solution.

	*  Install tesseract and the corresponding data package for your language
	*  Install ocrmypdf either from AUR or pip.

If your document is scanned/has no text layer, run it as 
ocrmypdf input.pdf output_with_text.pdf</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/parity_par2?rev=1735883248">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-03T05:47:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Parity and Par2</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/parity_par2?rev=1735883248</link>
        <description>Parity and Par2

There are a few option. Par2 (parchive) seems to be the standard here. Of course ZFS and BTRFS can keep track of parity bits in RAID setups, and ZFS will automatically correct the bit errors from the parity drive (as long as you don't pull an LTT and periodically scrub the drives).</description>
    </item>
    <item rdf:about="https://wiki.tonytascioglu.com/scripts/files/setting_up_luks_hard_drive?rev=1759172799">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-29T19:06:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Setting up an encrypted hard drive with LUKS and BTRFS</title>
        <link>https://wiki.tonytascioglu.com/scripts/files/setting_up_luks_hard_drive?rev=1759172799</link>
        <description>Setting up an encrypted hard drive with LUKS and BTRFS

Simple mode, adding to this site to serve as reference for friends.

This guide assumes `sda` as the drive letter, and `sda1` as your partition

Format the disk
sudo cfdisk /dev/sda
	*  choose GPT if you have a MBR vs GPT option</description>
    </item>
</rdf:RDF>
