Skip to content

Instantly share code, notes, and snippets.

View jamesstacyjones's full-sized avatar

Stacy Jones jamesstacyjones

View GitHub Profile
@jamesstacyjones
jamesstacyjones / gist:1a77649f24a81c7d7294
Created May 1, 2015 12:54
Remove Line Breaks from a Cell in Google Sheets
Copy this Regular Expression into Find / Replace:
\r\n|\n|\r
Then click 'Replace All' and bye bye line breaks.
[note] make sure there is no white space before or after the expression
@jamesstacyjones
jamesstacyjones / gist:ae659c2142ea9ed48d029d93a6576e70
Created August 20, 2016 13:26
Change files & directories with executable ... change back to normal
find / -type f -perm /a+x -exec chmod 0644 {} \;
find / -type d -perm /a+x -exec chmod 0755 {} \;
@jamesstacyjones
jamesstacyjones / gist:c70e38c69eca0806305e5426f9140907
Last active May 30, 2018 13:24
Command line to find large files in linux
Find top 20 largest files starting at root directory
du --exclude=/proc* -a / | sort -n -r | head -n 20
List the size of of the folders in the current directory
du -hsx * | sort -rh | head -10
Checks processes that are keeping deleted files open
lsof -s | grep deleted | sort -k 8
Check rotation of error logs ... as it is not working large files are being created
@jamesstacyjones
jamesstacyjones / gist:1df990bdf424ac1e42779b149a009754
Created August 5, 2017 14:55
mysql set root@localhost with grant privileges
grant all privileges on *.* to root@localhost identified by 'the password' with grant option;
flush privileges;