Skip to content

quick notes

some Unix notes

  • Home
  • Blog

Month: January 2017

rsync a linux OS, excluding the non-desireable files

January 16, 2017September 28, 2017rdircio

You can create a file to exclude all the patterns you need

# cat x.txt
/proc/*
/dev/*
/run/*
/tmp/*
/sys/*
/mnt/*lol
/media/*
/lost+found
/var/lib/origin/
/gbt/
/registry/
*log

Then just rsync
# rsync -rtva –progress / 10.156.197.10:/a/ –exclude-from x.txt

Uncategorized Leave a comment

preparing for an alternate disk chroot

January 16, 2017rdircio

These are the directories to mount:
# mount -o bind /proc /a/proc
# mount -o bind /dev /a/dev
# mount -o bind /sys /a/sys
# mount -o bind /run /a/run
# chroot /a /bin/bash

Once in, you may update your grub, but please check /etc/fstab before…
# grub2-install /dev/sda;grub2-mkconfig -o /boot/grub2/grub.cfg

Uncategorized Leave a comment

rsync only the folder structure

January 16, 2017rdircio

# rsync -av -f”+ */” -f”- *” /var/ 10.156.197.10:/a/var/

Uncategorized Leave a comment

Recent Posts

  • add some colour to your prompt
  • print all available ansi colors
  • remove ansi colors from file
  • get disk info for all solaris zones, including zfs and vxfs disks
  • get disk serial ids in AIX

Recent Comments

    Archives

    • April 2025
    • March 2025
    • January 2025
    • December 2024
    • October 2024
    • September 2024
    • July 2024
    • May 2024
    • April 2024
    • February 2024
    • January 2024
    • November 2023
    • October 2023
    • September 2023
    • August 2023
    • May 2023
    • April 2023
    • November 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • February 2022
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • October 2020
    • May 2020
    • April 2020
    • October 2019
    • September 2019
    • August 2019
    • July 2018
    • April 2018
    • January 2018
    • November 2017
    • October 2017
    • September 2017
    • January 2017
    • August 2015
    • May 2015
    • January 2015
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • July 2013
    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • November 2011
    • October 2011
    • January 2011
    • January 2010

    Categories

    • AppleTV
    • Linux
    • MacOS
    • Solaris
    • Uncategorized
    • Windows
    • xcrud

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Copyright © 2025 quick notes. All rights reserved. Theme: Radiate by ThemeGrill. Powered by WordPress.