Skip to content

Instantly share code, notes, and snippets.

@fulldeck
fulldeck / gist:e24e4c6156999ac8f57c3ba5b2aecb91
Last active January 11, 2021 08:00 — forked from prithv1/gist:83655754abc13ed80e06bfcc662177c9
/bin/tar: Argument list too long
@url https://major.io/2007/07/05/bintar-argument-list-too-long/
If you find yourself stuck with over 30,000 files in a directory (text files in this example), packing them into a tar file can be tricky.
Largest number of files completed 507,000 files of 355bytes each
NOTE: This will tap out all your servers resources and find the weak link; so be careful. CPU or Disk I/O?
You can get around it with this:
find . -name '*.txt' -print >/tmp/test.manifest
tar -cvzf textfiles.tar.gz --files-from /tmp/test.manifest
@fulldeck
fulldeck / install_chrome.ps1
Created February 2, 2019 19:31 — forked from mihaiiorga/install_chrome.ps1
Install Chrome on Windows via PowerShell
$Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path$Installer; Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path$Installer
@fulldeck
fulldeck / elk_install-6.5.4.ps1
Last active January 25, 2019 08:25 — forked from bferg314/elk_install.ps1
Download and Install ELK on Windows
# This install script will...
# Download and install ELK
# Install X-Pack
# Launch Elastic
# Run the set password script for elastic
# Change the version and the install path to whatever you want
$elk_version = "6.5.4"
$install_path = "c:/apps"
@fulldeck
fulldeck / Gist
Created January 25, 2019 05:26 — forked from jbnunn/Gist
Install Google Chrome from Powershell
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)