Intelligent Platform Management Interface
- Linux kernel module: ipmi_devintf
- Debian packages:
apt install openipmi ipmitool
ipmitool
Get info:
ipmitool lan print
ipmitool user list
ipmitool channel getaccess 1
Add new user and permissions:
ipmitool user set name 3 myusername
ipmitool user set password 3 <password> 16
ipmitool channel setaccess 1 3 link=on ipmi=on callin=on privilege=4
ipmitool test 3 16 <password>
* where ‘3’ is user id and ’16’ is length of password
SuperMicro
- IPMIView is a GUI app specific to SM BMC (Linux/Windows)
- Since 2019 the default "ADMIN" password is no longer used
- Every device now has a "Unique BMC Password" printed on sticker (pdf)
- ADMIN user has id 2
Linux
Create new partition with parted:
# mbr
parted /dev/sda mklabel msdos
parted /dev/sda mkpart primary ext4 0% 100%
# gpt
parted /dev/sda mklabel gpt
parted /dev/sda mkpart part-label ext4 0% 100%
Note that ‘part-label’ cannot be empty, to remove:
fdisk /dev/sda x n <enter> r w
To resize: parted /dev/sdX
then resizepart X
Clone MBR partition table:
Use sfdisk:
sfdisk -d /dev/sda > partitions.txt
sfdisk /dev/sdb < partitions.txt
sfdisk -d /dev/sda | sfdisk /dev/sdb
sfdisk -d /dev/sda | sfdisk --force /dev/sdb
Clone GPT partition table:
- use
sgdisk
- or
gdisk
Windows
Partitioning tools:
diskpart
(cli)- diskmgmt.msc
- Minitool Partition Wizard (3rd party)
- EaseUS Partition Master (3rd party)
Besides Chocolatey there’s also https://scoop.sh. A more "dev" oriented package manager for Windows PowerShell.
It installs "UNIXy" packages such as Git, cURL and vim. Languages such as Perl, PHP Python and Go are available just like Apache, Nginx and MySQL. Packages are installed into your homedir/profile, no UAC needed or changing PATH env var.
There are basically 3 different categories to choose from, depending on location of service and db: Local, "Cloud"/SaaS or selfhosted On-Premise.
For single user/home usage KeePass is fine or perhaps even the password manager included in web browsers. Using one of the SaaS options such as LastPass adds ease of access.
For company/enterprise usage sharing passwords in groups/teams should be supported and preferably an on-prem option.
- KeePass (Local), good choice and free
- PGP/pass (Local), cli
- LastPass (Cloud)
- 1Password (Cloud)
- Team Password Manager (On-prem), recommended
- Bitwarden (On-prem), dotnet/mssql docker stack
- Thycotic Secret Server supposedly also does "PAM"(?) (On-prem)
I’ve been using PS for a while now and I don’t hate it anymore :) In fact I think it’s very usable for lots of tasks and automation.
Some Useful commands:
Get-Command *help*
orGet-Command-Module PackageManagement
Get-Member
to view properties e.g.Get-Disk | Get-Member
Get-Alias
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
- piping to
select
,sort
andwhere
Invoke-WebRequest $url
CSV, XML and JSON support is included:
Import-CSV
Export-CSV
ConvertTo-XML
ConvertFrom-Json
ConverTO-Json
And stuff like:
- Logging sessions:
Start-Transcript
Stop-Transcript
- Viewing Certificates:
cd Cert:\
(now you can ‘dir’ etc) - Run as admin:
powershell.exe -Command "Start-Process cmd -Verb RunAs"
- PS Linting: https://github.com/PowerShell/PSScriptAnalyzer
Remote usage is also possible over WinRM (or OpenSSH):
Enter-PSSession -ComputerName <host>
Then there’s Loops, Params, Arrays and Hash Tables e.g. foreach
, Param([string]$arg)
, @()
and @{}
…
More info:
Chocolatey is a CLI based package manager for Windows
https://chocolatey.org
https://chocolatey.org/packages
https://github.com/chocolatey
Install:
choco install <pkg>
Search:
choco search <pkg> [-l] for local pkgs
List upgradable pkgs:
choco outdated
Upgrade options:
choco upgrade <pkg> --reinstall
choco upgrade <pkg> --force
choco upgrade <pkg> --[checksum|checksum64]
Upgrade all:
FOR /F "delims=|" %i IN ('choco outdated -r') DO ( @choco upgrade %i )
Using parameters:
choco install nvidia-display-driver --params="'/FOO /BAR'"
Log:
C:\ProgramData\chocolatey\logs\chocolatey.log
GUI:
https://github.com/chocolatey/ChocolateyGUI
Install with chocolatey: choco install chocolateygui
Just a few useful ‘find’ examples
Exclude:
find . -path ./foo -prune -o -name bar
find /home \( -path /usr/data -prune -o -path /usr/src \) -prune -o -name foo -print
find . -name Makefile -not -path foo
find . -type d ! -regex .*\/\(foo\|bar\).* \;
Permissions:
find . -perm -775
find . -perm /u+w,g+
find . -printf "%m:%f\n"
find . -printf "%m %h/%f\n"|grep -v '^\(644\|755\)'
Print date:
find -type f -printf '%TF %.8TT %p\n'
Windows:
find.exe . -name *.exe -exec certutil -hashfile {} SHA512 ; >c:\hash.txt
BITS
Tool from Intel called “BIOS Implementation Test Suite”. Bootable (usb) image which can do several things including handling microcode:
Linux
load/update microcode using pkg:
Debian
- Intel:
apt install intel-microcode iucode-tool
- AMD:
apt install amd64-microcode
- Doc: /usr/share/doc/{intel,amd64}-microcode/README.Debian.gz
CentOS/RH
microcode_ctl
- https://git.centos.org/summary/rpms!microcode_ctl.git
load/update intel microcode manually:
- get latest tgz from intel: see below
- backup/copy files: /lib/firmware/intel-ucode
- check kernel config:
grep MICROCODE /boot/config-*
run iucode_tool:
/usr/sbin/iucode_tool -tb -lS /lib/firmware/intel-ucode/*
update initramfs:
update-initramfs -u -k all
reloading microcode:
echo 1 > /sys/devices/system/cpu/microcode/reload
or:
rmmod cpuid; modprobe cpuid
show version:
dmesg | grep microcode
grep microcode /proc/cpuinfo
skip loading microcode on boot:
- add to grub cmdline:
dis_ucode_ldr
Windows
Microsoft includes microcode updates in Windows for certain CPU’s. For example: KB4090007, KB3064209, KB2970215.
load/update microcode:
- using a VMWare driver called “cpumcupdate”: https://labs.vmware.com/flings/vmware-cpu-microcode-update-driver
show version:
- get hwinfo64 and goto “Central Processor(s)” > “Microcode Update Revision”
- or get “Read & Write Everything” (RWEverything) from http://rweverything.com
Get Microcode
Download the latest version from Intel:
https://downloadcenter.intel.com/download/27431/Linux-Processor-Microcode-Data-File?v=t.
How to create a 6to4 tunnel in Windows using CLI (for use with HE’s free Tunnel Broker service for example).
netsh interface teredo set state disabled netsh interface ipv6 add v6v4tunnel TunnelNamenetsh interface ipv6 add address TunnelName 2001:a:b:c::2 netsh interface ipv6 add route ::/0 TunnelName 2001:a:b:c::1
Where:
- “2001:a:b:c::” is your prefix
- “2001:a:b:c::1” is the gateway
- “2001:a:b:c::2” is your ipv6 address
Delete the tunnel:
netsh interface ipv6 delete address TunnelName 2001:a:b:c::2 netsh interface ipv6 delete route ::/0 TunnelName 2001:a:b:c::1 netsh interface ipv6 delete interface TunnelName
A HE tunnel can be requested here: https://tunnelbroker.net.
Product Key can now be a “Digital License”. This seems to be true for upgraded Windows 7 keys.
To prevent activation issues after hardware changes: link MS account to digital license asap (Settings > Accounts).
View current license:
slmgr.vbs /dlv
wmic path softwarelicensingservice get OA3xOriginalProductKey
powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"
Update product key:
run slui.exe
or goto Settings > Activation
MS Activation servers:
activation-v2.sls.microsoft.com validation-v2.sls.microsoft.com
More info:
https://support.microsoft.com/en-us/help/20530/windows-10-reactivating-after-hardware-change
How to find out Windows Uptime?
Using PowerShell:
powershell ((Get-Date) - (gcim Win32_OperatingSystem).LastBootUptime).ToString('g')
powershell ((Get-Date) - ([wmi]'').ConvertToDateTime((Get-WmiObject win32_operatingsystem).LastBootUpTime)).ToString("dd' days 'hh\:mm\:ss")
Also, I cobbled together this little script that looks like the Linux uptime cmd. It’s embedded in a batch file so for ease of running (https://blogs.msdn.microsoft.com/jaybaz_ms/2007/04/26/powershell-polyglot/ for more info). Gist: https://git.io/v5tx0.
@PowerShell -ExecutionPolicy RemoteSigned -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content -LiteralPath '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF $d = Get-Date $upTime = (($d) - ([wmi]'').ConvertToDateTime((Get-WmiObject win32_operatingsystem).LastBootUpTime)).ToString("d' days, 'h\:mm") $ActiveUsers = @() foreach($User in (Get-WmiObject Win32_LoggedOnUser).Antecedent) { $ActiveUsers += $User.Substring($User.LastIndexOf('=') + 2, $User.Length - $User.LastIndexOf('=') -3) } $UserText = "$($ActiveUsers.Count) user" if ( $ActiveUsers.Count -gt 1 ) { $UserText += "s" } $TotalProcTime = (Get-Counter "\Processor(_total)\% Processor Time") | foreach {$_.CounterSamples[0].CookedValue} Write-Host -NoNewLine (" {0}, up {1}, {2}, total proctime: {3}%" -f $d.toString("HH:mm:ss"), $upTime, $UserText, [math]::Round($TotalProcTime,2))
Output looks like this:
C:\Users\silver>uptime 14:45:41, up 5 days, 20:15, 3 users, total proctime: 2,26%
GUI (Windows 10):
Task Manager (taskmgr
) > More details > Performance tab > CPU
Boot Time:
net stats <workstation/server>
systeminfo | findstr "System Boot Time"
Windows Anti-Malware Software:
- ATF Cleaner
ATF-Cleaner.exe
http://www.atribune.org (OLD!) - AdwCleaner
adwcleaner_x.xxx.exe
https://www.malwarebytes.com/adwcleaner - CCleaner
ccsetupxxx.exe
https://www.piriform.com/ccleaner/builds - clean_services
http://www.techspot.com/community/topics/crawling-no-download-streaming.129008 - DDS
dds.com
(sUBs)
https://www.bleepingcomputer.com/download/dds - GMER <
random.exe>
http://www.gmer.net - HitmanPro
hitmanpro_x64.exe
(Sophos)
http://get.hitmanpro.com - Junkware Removal Tool
JRT.exe
https://downloads.malwarebytes.org/file/jrt - KCleaner
kcleaner.zip
http://www.kcsoftwares.com/?download - Microsoft Security Essentials
mseinstall.exe
https://www.microsoft.com/en-us/download/details.aspx?id=5201 - RootkitRevealer
RootkitRevealer.zip
https://download.sysinternals.com/files/RootkitRevealer.zip
Check if a program if not already running before starting it in a Windows batch file.
Uses C:\Windows\System32\find.exe
(findstr should work equally well).
Example:
tasklist /nh /fi "imagename eq explorer.exe" | find /i "explorer.exe" > nul || ( start "" C:\WINDOWS\explorer.exe )
Function:
:func_runImageTask tasklist /nh /fi "imagename eq %~1" | find /i "%~1" > nul || ( start "" "%~2" ) GOTO :EOF
Function using window titles:
:func_runTitleTask tasklist /v | find "%~1" > nul || ( start "" "%~2" ) GOTO :EOF
Call function:
CALL :func_runImageTask "Calculator.exe" "C:\WINDOWS\System32\calc.exe" CALL :func_runTitleTask "Calculator" "C:\WINDOWS\System32\calc.exe"
From:
This batch file takes program names (IMAGENAMES
variable) or window titles (WINDOWTITLES
and starts them if they are not already running. Programs can have arguments (e.g. outlook.exe).
ReOpen.bat
:: :: ReOpens programs which are not already running 20161220 slv :: @echo off setLocal EnableDelayedExpansion :: :: Configure programs here making sure to use ,^ at eol for continuation :: SET IMAGENAMES=^ "chrome.exe,C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",^ "Xshell.exe,C:\Program Files (x86)\NetSarang\Xshell 5\Xshell.exe",^ "outlook.exe,C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE,/recycle" FOR %%x in (%IMAGENAMES%) DO ( FOR /f "tokens=1-3 delims=," %%a in (%%x) do ( CALL :func_runImageTask "%%a" "%%b" "%%c" ) ) SET WINDOWTITLES=^ "www@webserver,C:\Program Files (x86)\PuTTY\putty.exe,-load webserver",^ "user@debian,C:\Program Files (x86)\PuTTY\putty.exe,-load debian" FOR %%x in (%WINDOWTITLES%) DO ( FOR /f "tokens=1-3 delims=," %%a in (%%x) DO ( CALL :func_runTitleTask "%%a" "%%b" "%%c" ) ) GOTO :EOF :func_runImageTask tasklist /nh /fi "imagename eq %~1" | %windir%\system32\find.exe /i "%~1" > nul || ( start "" "%~2"^ %~3 ) GOTO :EOF :func_runTitleTask tasklist /v | %windir%\system32\find.exe "%~1" > nul || ( start "" "%~2"^ %~3 ) GOTO :EOF :: :: Examples: :: :: MANUAL: tasklist /nh /fi "imagename eq explorer.exe" | %windir%\system32\find.exe /i "explorer.exe" > nul || ( start "" C:\WINDOWS\explorer.exe C:\Users\%USERNAME%\Desktop ) :: FUNCTION: CALL :func_runImageTask "Calculator.exe" "C:\WINDOWS\System32\calc.exe" ::
I’ve been searching for an alternative for plain PuTTY for a while now.
My requirements are:
- free, preferably open source
- in active development
- ssh-agent
- GUI
- Tabs
- Window transparency
I’ve looked at the following:
- PuTTY based:
- MTPuTTY, KiTTY, PuTTYTray (https://puttytray.goeswhere.com) etc
- mRemoteNG, PuTTYCM, PuTTYTabManager, PuTTYMan, SuperPuTTY, …
- Cygwin + OpenSSH (no GUI)
- SecureCRT (not free)
- ConEmu (https://conemu.github.io) + PuTTY
- XShell (https://www.netsarang.com/products/xsh_overview.html)
However none of them work flawlessly (I probably have used ConEmu and PuTTY the longest).
Currently I’m using XShell instead which is it’s own thing instead of being PuTTY based.
I also still use PuTTYTray which is one of the more useful PuTTY derivatives (eg transparency, tray, cygterm and can save sessions to file).
Update: I’ve forked over the cheese and completely switched to XShell. I also use (the free version of) Xftp more and more.
These are supposed to be good alternatives too and I might look at them in the future:
- Poderosa
- …
Jan 2017: Just noticed Termius (previously Serverauditor) which I use on iOS – to my full satisfaction – will be getting a Windows version.
Dec 2018: There’s also Hyper, an Electron and node.js based alternative: https://hyper.is. It supports tabs and can be extended with plugins. Imo it’s a bit resource heavy and can get sluggish with many tabs and plugins loaded, but not bad.. not bad.
Jun 2019: Been using the quite nice MobaXterm at work the past few months. It’s basically a tabbed GUI around PuTTY with Cygwin and X11 support etc. I use it with WSL for local terminals and that’s been working well for me.
Aug 2019: Microsoft finally decided to offer the competent Windows Terminal. Tabs, colors, theming, supports both Cmd and PS… and ssh works fine. Very useful. This is what I now use as Windows Console and for WSL. Also still using XShell 6.
PS = Run in Powershell
System config:
sconfig
netdomf
slmgr.vbs /skms kms.domain.local:1688
wmic product
wmic softwarefeature list brief
# PS: wmi Win32_SoftwareFeature | Select ProductName, Caption, Version | ft * # change name Rename-Computer # remove from domain & reboot Remove-Computer -credential domain\account -passthru -verbose -force Restart-Computer
Diskpart:
list disk
select disk X
If disk is set as read-only, first run:
attributes disk clear readonly
create partition primary
(or size = )
select partition X
format fs=ntfs quick
assign
list volume
select volume X
remove letter=D
assign letter=L
Network:
# PS: Get-NetIPInterface New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.0.2.2 -PrefixLength 24 -DefaultGateway 192.0.2.1 Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.0.2.4,192.0.2.5
netsh interface ip set address name="Local Area Connection" static 10.94.45.213 255.255.255.224 10.94.45.193
Firewall:
netsh advfirewall set allprofiles state off
netsh advfirewall set allprofiles state on
RDP:
# PS: Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication' Get-netfirewallrule -DisplayGroup 'Remote Desktop' | ft -autosize Name, Enabled New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' -Value 0 -PropertyType dword New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication' -Value 1 -PropertyType dword Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' -Value 0 Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication' -Value 1 Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'
Task Scheduler:
schtasks /create /tn 'Task Name' /tr 'D:\Dir\file.exe' /ru DOMAIN\user /rp /sc daily /st 03:30 schtasks /change /tn 'Task Name' /ru DOMAIN\user schtasks /delete /tn 'Task Name' schtasks /run /tn 'Task Name' /i schtasks /query /fo table /nh schtasks /query /tn 'Task Name' /fo list /v
Telnet:
# PS: Import-Module servermanager Add-WindowsFeature telnet-client
TS Share:
# PS: cd \\tsclient\c
Before I chose to replace TrueCrypt with VeraCrypt I was looking for/comparing alternatives.
I also use Bitlocker and EFS that are included with Windows.
- BestCrypt
- CipherShed
- Free, Open Source
- Based on TrueCrypt
- https://www.ciphershed.org
- DiskCryptor
- Free, Open Source
- Windows only
- https://diskcryptor.net
- LibeCrypt
- Free, Open Source
- Windows only but supports dm-crypt/LUKS
- Uses unsigned drivers
- https://github.com/t-d-k/LibreCrypt
- Symantec Endpoint Encryption
- Paid
- Uses PGP
- https://www.symantec.com/endpoint-encryption
TrueCrypt- VeraCrypt
- Free, Open Source
- Based on TrueCrypt
- https://veracrypt.codeplex.com
- https://revlis.nl/2012/03/13/windows-7-backup-and-truecrypt
Except for DiskCryptor and LibreCrypt all these programs also run on Linux.
- Download dev snapshot:
- https://tartarus.org/~simon/putty-snapshots/putty-src.zip"
- https://tartarus.org/~simon/putty-snapshots/putty-src.zip.gpg
- https://tartarus.org/~simon/putty-snapshots/sha512sums
gpg --verify putty-src.zip.gpg putty-src.zip
grep $( sha512sum putty-src.zip ) sha512sums
- Run the compile.sh script below
#!/bin/sh
echo
echo "putty needs the following pkgs under cygwin64:"
echo "mingw64-x86_64-headers w32api w32api-headers"
echo
#export PERL5LIB=/usr/lib/perl5/5.22/CPAN
perl mkfiles.pl
sed -i.bak 's/^M//g' licence.h
make distclean
cd windows
make clean -f Makefile.mgw
make -j4 \
TOOLPATH="x86_64-w64-mingw32-" \
CFLAGS="-Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT -D_NO_OLDNAMES -I.././ \
-I../charset/ -I../windows/ -I../unix/ \
-D_WIN32_IE=0x0500 \
-DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500 \
-DNO_MANIFESTS" \
LDFLAGS="-s" \
RCFLAGS="--define WIN32=1 --define _WIN32=1 --define WINVER=0x0400 \
-I.././ -I../charset/ -I../windows/ -I../unix/" \
COMPAT="-DWINSOCK_TWO -DNO_MULTIMON" \
-f Makefile.mgw
It’s also possible to make with version variables:
make VER="-DSNAPSHOT=$(date '+%Y-%m-%d') -DSVN_REV='$(svnversion)' -DMODIFIED" TOOLPATH=i586-mingw32msvc- -f Makefile.cyg putty.exe
From http://lifehacker.com/5917787/how-to-delete-a-song-from-your-itunes-library-from-the-playlist-view
How to Delete a Song from Your iTunes Library from the Playlist View
If you find a song in one of your iTunes playlists that you no longer want, you
usually have to go all the way back to the “Music” view and find it inorder to
delete it. This keyboard shortcut saves you the hassle, deleting the item right
from the playlist view.
Ordinarily, pressing the delete key while in a playlist will only prompt you to
remove the song from that playlist. If you want to remove it from yourlibrary
entirely, just press Shift+Delete (on Windows) or Option+Delete (on OS X), and
you’ll get the prompt to remove the song from your libraryentirely. Pretty handy
for us playlist junkies.
—
From http://trevinchow.com/blog/2010/01/03/deleting-song-in-itunes-library-from-within-a-playlist/
So when you’re in an iTunes playlist and want to remove the song from the playlist only, use Delete. If you want to remove it from both the playlist AND your iTunes Library, use Shift+Delete !
(There is also another undocumented shortcut – CTRL + SHIFT + Delete which will do the same thing as Shift+Delete except it will add an extra confirmation for sending the file to the recycle bin. Since you already get one prompt using Shift+Delete, there’s no reason for this extra step)
Show databases:
mysql -u root -p -e 'show databases;'
Create new database:
CREATE database username GRANT ALL ON username.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Create admin user:
$ mysql --user=root -p mysql CREATE USER 'admin'@'localhost' IDENTIFIED BY 'KNOWNPW'; GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
Password reset root user:
Linux:
$ /etc/init.d/mysql stop $ mysqld_safe --skip-grant-tables $ mysql --user=root mysql
SELECT * FROM user;
update user set Password=PASSWORD('MyNewPass') where user='root'; flush privileges; exit
$ /etc/init.d/mysql start
Windows:
C:\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt --console UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;
Various:
(run mysql interactively)
Set password hash:
set password for 'root'@'localhost' = '*H4SHH4SHH4SHH4SHH4SHH4SHH4SHH4SHH4SHH4SH';
Show user:
SELECT user, host FROM mysql.user WHERE user='root'
List databases/tables:
SHOW databases; SHOW tables;
Import from cli:
source path/to/file.sql;
INSERT IF NOT EXISTS:
INSERT IGNORE INTO
Dump binary data
use option --hex-blob
PE header:
"PE..L" (hex: 504500004C) = 32 bit
"PE..d†" (hex: 504500006486) = 64 bit
Create shortcut here:
%UserProfile%\AppData\Roaming\Microsoft\Windows\SendTo
shell:sendto
C:\Users\USER\AppData\Roaming\Microsoft\Windows\SendTo
Green fg text and a readable blue:
R
G
B
Default Foreground:
0
255
0
Default Bold Foreground:
106
255
106
ANSI Blue:
Colour 14
64,64,255
64
64
255
ANSI Blue Bold:
Colour 15
94,94,255
94
94
255
My Documents C: -> D:
robocopy "C:\Users\silver\Documents" "D:\backups\Documents" /copyall /efsraw /mir /sl /zb
D: -> E:
for %i in (dir1 dir2 dir2) do robocopy D:\%i E:\%i /copyall /mir /sl /zb /MT:128 /XD_exclude_this_dir
/XD dirs [dirs]… :: eXclude Directories matching given names/paths.
C:\>for /f %i IN ('dir /b') do echo %i C:\>for /f %i IN (bla.txt) do echo %i
Linux:
First check the drive (see if erase operations are supported):
# hdparm -I /dev/X
# hdparm --user-master u --security-set-pass Password /dev/X
# time hdparm --user-master u --security-erase Password /dev/X
or (if supported):
# time hdparm --user-master u --security-erase-enhanched Passwrd /dev/X
Works also for HDD’s.
More info:
https://ata.wiki.kernel.org/articles/a/t/a/ATA_Secure_Erase_936d.html
https://www.thomas-krenn.com/en/wiki/SSD_Secure_Erase
Alternatively boot into Parted Magic and use GUI.
You must be logged in to post a comment.