Linux text manipulation

This article will grow over time

DefinitionCommand
1Remove all comments including empty line (comments with ; and # like in samba.conf)egrep -v '^[[:space:]]*$|^ *#|^ *;' /etc/samba/smb.conf
2Find all file with some extension and remove it one by one; works for gnu xargs; 0 argument to properly interpret spaces in path namefind . -iname "*.remove" -print0 | xargs -0 -I{} rm -rfv "{}"

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Linux
Creating random (not empty, thin provisioned) files in Linux

Recently I have found the command that can generate random file in linux environment where non empty (thin provisioned) files are required for testing: todo: combine that command with parallel command (or parallel that in python).

VMware
VCF, backup configuration

Backup implementation for VMware component is fairly easy. Just the requirements is to configure SFTP server in proper way and make it network available to the VMware components. SDDC Manager and NSX Manager backup In VCF Operations it is possible to configure backup for SDDC Manager and NSX Manager. Go …

VMware
VCF Automation, fresh environment configuration with identity providers and access control.

Introduction Login Login as user admin to the Organization name: system or if selected manual: Check the connections (in Administration section), where you should see connection to the vCenter and NSX-t manager as those are provided automatically via VCF Operations: the same for VCF Instances: Also check your networking: Identity …