cat /var/run/yum.pid
<pid>
kill -9 <pid>
To get more details, use
ps -p <pid>
or
ps -ef | grep <pid>
A blog about coding
cat /var/run/yum.pid
<pid>
kill -9 <pid>
To get more details, use
ps -p <pid>
or
ps -ef | grep <pid>
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”.
As Debian system says,
The canonical non-existent home directory is
/nonexistent
. Users who should not have a home directory should have their home directory set to this value.
The Debian autobuilders set HOME to/nonexistent
so that packages which try to write to a home directory will fail to build.
Remove those entries that have an error of “Permission Denied” :
find /opt -name dcm 2>/dev/null
Filter the output of a program and redirect the filtered result into a file:
./bin/programA -i ... -o ... 2>&1 | grep "keywords" > a.txt
Sometimes the file that is read by xmgrace has a header like below:
Ratio
0.67
0.52
...
If use xmgrace directly, we cannot plot the curve as expected.
I haven’t found the way of using xmgrace only. Instead, I only found how to specify columns using xmgrace.
With the help of other tools, here is a way to work around.
tail -n +2 a.txt | xmgrace -pipe
or
sed 1d a.txt | xmgrace -pipe
Firewalld is a firewall management solution provided by Linux.
Check if firewalld is running:
sudo firewall-cmd --state
running
Disable firewalld:
sudo systemctl disable --now firewalld
Check its state again:
sudo firewall-cmd --state
not running
Enable firewalld:
sudo systemctl disable --now firewalld
or
sudo /usr/sbin/firewalld