cat /var/run/yum.pid
<pid>
kill -9 <pid>
To get more details, use
ps -p <pid>
or
ps -ef | grep <pid>
More flesh, less fluff.
cat /var/run/yum.pid
<pid>
kill -9 <pid>
To get more details, use
ps -p <pid>
or
ps -ef | grep <pid>
gdb <binary>
gdb --args <binary> -i ...
(gdb) break filename:linenum
(gdb) step
(gdb) stepi
(gdb) next
(gdb) nexti
(gdb) finish
(gdb) continue
(gdb) until
(gdb) frame <frame #>
(gdb) info args
(gdb) info locals
(gdb) p <variable name>
(gdb) clear linenum
(gdb) clear filename:linenum
(gdb) info break
(gdb) del <breakpoint #>
(gdb) del <start #> - <end #>
(gdb) help <option name>
make &> build.txt
All build outputs including warnings and errors will be redirected to build.txt. If without &, errors and warnings will not be redirected to the file.
export QA_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=1
These two settings are BOTH required.
Node.js 8:
var uuid = require("uuid/v4")
var sessionId = uuid()
Node.js 10:
var uuid = require("uuid")
var sessionId = uuid.v4()
import xml.etree.ElementTree as ET
root = ET.Element('Configuration')
student = ET.SubElement(root, 'student')
ET.SubElement(student, 'name').text = 'A'
ET.SubElement(student, 'years').text = '20'
# Test the result
import xml.dom.minidom
dom = xml.dom.minidom.parseString(ET.tostring(root))
print(dom.toprettyxml())
The result is below.
<?xml version="1.0" ?>
<Configuration>
<student>
<name>A</name>
<years>20</years>
</student>
</Configuration>
import xml.dom.minidom
dom = xml.dom.minidom.parse(xml_fname)
# or
# dom = xml.dom.minidom.parseString(xml_string)
pretty_xml_as_string = dom.toprettyxml()
Delete all txt files:
find ~/testFolder/*.txt -user @USERNAME -exec rm {} \;
Note, the semicolon is necessary.
Delte all files and directories:
find ~/testFolder/ -user @USERNAME -exec rm -rf {} \;
But be careful using “-rf”.
git remote rename origin upstream
git remote add origin NEW_REMOTE_REPOSITORY
git push origin master