Method is similar to restoring a corrupt btrfs filesystem. Trying to restore a file or folder or subvolume that you accidentally deleted and you dont have a snapshot (perhaps because you accidentallyRead More…
Accidentally unmounted dev devpts sys or proc remounting — /dev, /dev/pts, /sys, /proc mounting
If you accidentally unmounted the following tmpfs on /dev type tmpfs (rw,noatime,nodiratime,size=10240k,mode=755) devpts on /dev/pts type devpts (rw,noatime,nodiratime,mode=600) /dev/md0 on / type btrfs (rw,noatime,nodiratime,nospace_cache) proc on /proc type proc (rw,nosuid,nodev,noexec,noatime,nodiratime) sysfs onRead More…
How to plot/graph data in a file with Python using Linux – Bonus: Dates on X axis & Trend Line
This article is probably worth reading twice due to my style of writing (sorry). Read the comments as they have alot of informational text. I tried to make them understandable to aRead More…
Solution to rare problem – Hard to see VIM with SPF13 (or any theme) in screen or tmux?
Maybe someone will come across this one. But I had an issue with screen and tmux making themes in vim ugly and hard to work with (and i wouldnt doubt if dtach andRead More…
Regular Expression (regexp:sed/grep) match everything until the next occurance of character
EXAMPLE 1 Lets generate some random text: cd /lib/udev/rules.d grep -nir . * | grep SYMLINK | head > /root/text0.txt SIDENOTE: actually at the time, this text was not random for me.Read More…
udev & mknod & mdev — and — Udevadm to gather info about a device & all devices
Citation: http://possiblelossofprecision.net/?p=343 INTRO UDEV is a service/package that detects new devices connected to the linux server and launches predefined scripts and also makes them accessible through /dev. In the old daysRead More…
Backing up & Restoring Permissions in Linux with GetFACL and SetFACL
Use getfacl and setfacl. Will work even if you dont run your filesystem with “acl” mode. “acl” mount option (Available by installing acl program) gives more permissions than your standard u/g/o r/w/x.Read More…
Kitty/Putty Desert Theme (easy on eyes and much more beautiful)
As per article: http://www.darkrune.org/blog/?p=213 We will make our sessions look like this: Via Kitty and Putty: Go to Window->Colours Start off with default colours and do this: * Default Foreground: 255/255/255 *Read More…
Find & delete files between 2 dates & times
Make 2 files that will be the marking point of the beginning and the end. touch -t yyyymmddHHMMSS start_date_file_name touch -t yyyymmddHHMMSS end_date_file_name Then delete everything between those 2 days: find .Read More…
Linux – Biggest command I can give to BASH
The biggest command you can give to bash depends on your system. you can find that out by typing this: # getconf ARG_MAX ARG_MAX is a system variable (kernel variable) that tellsRead More…