aboutsummaryrefslogtreecommitdiff
path: root/content/blog/commands
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--content/blog/commands/_index.md5
-rw-r--r--content/blog/commands/asterisk-call-you.md8
-rw-r--r--content/blog/commands/asterisk-list-active-calls.md8
-rw-r--r--content/blog/commands/busybox-web-server.md11
-rw-r--r--content/blog/commands/capture-desktop-video.md10
-rw-r--r--content/blog/commands/clean-conntrack-states.md10
-rw-r--r--content/blog/commands/date.md10
-rw-r--r--content/blog/commands/dmidecode.md10
-rw-r--r--content/blog/commands/find-hardlinks.md8
-rw-r--r--content/blog/commands/find-inodes-used.md8
-rw-r--r--content/blog/commands/git-import-commits.md11
-rw-r--r--content/blog/commands/git-rewrite-commit-history.md9
-rw-r--r--content/blog/commands/ipmi.md8
-rw-r--r--content/blog/commands/mdadm.md8
-rw-r--r--content/blog/commands/megacli.md8
-rw-r--r--content/blog/commands/omreport.md7
-rw-r--r--content/blog/commands/qemu-nbd.md10
-rw-r--r--content/blog/commands/qemu.md7
-rw-r--r--content/blog/commands/rrdtool.md6
19 files changed, 88 insertions, 74 deletions
diff --git a/content/blog/commands/_index.md b/content/blog/commands/_index.md
deleted file mode 100644
index c061e46..0000000
--- a/content/blog/commands/_index.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: "Commands"
-linkTitle: "Commands"
-weight: 40
----
diff --git a/content/blog/commands/asterisk-call-you.md b/content/blog/commands/asterisk-call-you.md
index 7dd65f3..75d642b 100644
--- a/content/blog/commands/asterisk-call-you.md
+++ b/content/blog/commands/asterisk-call-you.md
@@ -1,11 +1,13 @@
---
title: "List active calls on asterisk"
-linkTitle: "List active calls on asterisk"
date: 2018-09-25
-description: >
- How to show active calls on an asterisk system
+description: How to show active calls on an asterisk system
+tags:
+ - asterisk
---
+## Using the cli
+
{{< highlight yaml >}}
watch -d -n1 'asterisk -rx “core show channels”'
{{< /highlight >}}
diff --git a/content/blog/commands/asterisk-list-active-calls.md b/content/blog/commands/asterisk-list-active-calls.md
index 73c712e..285d330 100644
--- a/content/blog/commands/asterisk-list-active-calls.md
+++ b/content/blog/commands/asterisk-list-active-calls.md
@@ -1,11 +1,13 @@
---
title: "How to have asterisk call you into a meeting"
-linkTitle: "How to have asterisk call you into a meeting"
date: 2018-09-25
-description: >
- How to have asterisk call you itself into a meeting
+description: How to have asterisk call you itself into a meeting
+tags:
+ - asterisk
---
+## Using the cli
+
At alterway we sometimes have DTMF problems that prevent my mobile from joining a conference room. Here is something I use to have asterisk call me
and place me inside the room :
diff --git a/content/blog/commands/busybox-web-server.md b/content/blog/commands/busybox-web-server.md
index 37f9ac6..666fb8e 100644
--- a/content/blog/commands/busybox-web-server.md
+++ b/content/blog/commands/busybox-web-server.md
@@ -1,12 +1,15 @@
---
title: "Busybox web server"
-linkTitle: "Busybox web server"
date: 2019-04-16
-description: >
- Busybox web server
+description: How to serve static files from only busybox
+tags:
+ - linux
+ - simple utilities
---
-If you have been using things like `python -m SimpleHTTPServer`, here is something even more simple and lightweight to use :
+## The command
+
+If you have been using things like `python -m SimpleHTTPServer` to serve static files in a pinch, here is something even more simple and lightweight to use :
{{< highlight sh >}}
busybox httpd -vfp 80
diff --git a/content/blog/commands/capture-desktop-video.md b/content/blog/commands/capture-desktop-video.md
index f56572a..3bc0c38 100644
--- a/content/blog/commands/capture-desktop-video.md
+++ b/content/blog/commands/capture-desktop-video.md
@@ -1,12 +1,14 @@
---
title: "Capture a video of your desktop"
-linkTitle: "Capture a video of your desktop"
date: 2011-11-20
-description: >
- Capture a video of your desktop
+description: Capture a video of your desktop
+tags:
+ - ffmpeg
---
-You can capture a video of your linux desktop with ffmpeg :
+## The command
+
+You can capture a video of your linux desktop very easily with ffmpeg :
{{< highlight sh >}}
ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq /tmp/out.mpg
diff --git a/content/blog/commands/clean-conntrack-states.md b/content/blog/commands/clean-conntrack-states.md
index 8a78930..eee4da9 100644
--- a/content/blog/commands/clean-conntrack-states.md
+++ b/content/blog/commands/clean-conntrack-states.md
@@ -1,12 +1,14 @@
---
title: "Clean conntrack states"
-linkTitle: "Clean conntrack states"
date: 2018-03-02
-description: >
- Clean conntrack states
+description: How to clean conntrack states
+tags:
+ - linux
---
-Here is an example of how to clean conntrack states that match a specific query on a linux firewall :
+## A not so simple command
+
+Firewalling on linux is messy, here is an example of how to clean conntrack states that match a specific query on a linux firewall :
{{< highlight sh >}}
conntrack -L conntrack -p tcp –orig-dport 65372 | \
diff --git a/content/blog/commands/date.md b/content/blog/commands/date.md
index e0b2bcc..07d5b41 100644
--- a/content/blog/commands/date.md
+++ b/content/blog/commands/date.md
@@ -1,12 +1,14 @@
---
title: "Convert unix timestamp to readable date"
-linkTitle: "Convert unix timestamp to readable date"
date: 2011-01-06
-description: >
- Convert unix timestamp to readable date
+description: the -d flag of the date command combined with @timestamp
+tags:
+ - simple utilities
---
-As I somehow have a hard time remembering this simple date flags as I rarely need it, I decided to write it down here :
+## The trick
+
+I somehow have a hard time remembering this simple date flags *(probably because I rarely get to practice it), I decided to write it down here :
{{< highlight sh >}}
$ date -d @1294319676
diff --git a/content/blog/commands/dmidecode.md b/content/blog/commands/dmidecode.md
index c7bcc1f..52accc4 100644
--- a/content/blog/commands/dmidecode.md
+++ b/content/blog/commands/dmidecode.md
@@ -1,12 +1,14 @@
---
title: "DMIdecode"
-linkTitle: "DMIdecode"
date: 2011-02-16
-description: >
- DMIdecode
+description: Some DMIdecode common flags
+tags:
+ - simple utilities
---
-DMIdecode to obtain Hardware informations.
+## Introduction
+
+DMIdecode is a tool to obtain Hardware informations.
## Mose useful commands
diff --git a/content/blog/commands/find-hardlinks.md b/content/blog/commands/find-hardlinks.md
index dd1b424..b4a4011 100644
--- a/content/blog/commands/find-hardlinks.md
+++ b/content/blog/commands/find-hardlinks.md
@@ -1,12 +1,12 @@
---
title: "Find hardlinks to a same file"
-linkTitle: "Find hardlinks to a same file"
date: 2018-03-02
-description: >
- Find hardlinks to a same file
+description: How to list hardlinks that link to the same file
+tags:
+ - find
+ - simple utilities
---
{{< highlight sh >}}
find . -samefile /path/to/file
{{< /highlight >}}
-
diff --git a/content/blog/commands/find-inodes-used.md b/content/blog/commands/find-inodes-used.md
index d9965a4..efa29af 100644
--- a/content/blog/commands/find-inodes-used.md
+++ b/content/blog/commands/find-inodes-used.md
@@ -1,12 +1,12 @@
---
title: "Find where inodes are used"
-linkTitle: "Find where inodes are used"
date: 2018-04-25
-description: >
- Find where inodes are used
+description: How to locate what is taking all the inodes in the subdirectory of a given device
+tags:
+ - find
+ - simple utilities
---
{{< highlight sh >}}
find . -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
{{< /highlight >}}
-
diff --git a/content/blog/commands/git-import-commits.md b/content/blog/commands/git-import-commits.md
index 5ec2bc1..0286282 100644
--- a/content/blog/commands/git-import-commits.md
+++ b/content/blog/commands/git-import-commits.md
@@ -1,13 +1,14 @@
---
title: "Import commits from one git repo to another"
-linkTitle: "Import commits from one git repo to another"
date: 2018-09-25
-description: >
- Import commits from one git repo to another
+description: How to take commits from one git repo and bring them into another
+tags:
+ - git
---
-This imports commits from a repo in the `../masterfiles` folder and applies them to the repository inside the current folder :
+## The trick
+
+In an ideal world there should never be a need to do this, but here is how to do it properly if you ever walk into this bizarre problem. This command imports commits from a repo in the `../masterfiles` folder and applies them to the repository inside the current folder :
{{< highlight sh >}}
(cd ../masterfiles/; git format-patch –stdout origin/master) | git am
{{< /highlight >}}
-
diff --git a/content/blog/commands/git-rewrite-commit-history.md b/content/blog/commands/git-rewrite-commit-history.md
index 6d241ed..8378a9c 100644
--- a/content/blog/commands/git-rewrite-commit-history.md
+++ b/content/blog/commands/git-rewrite-commit-history.md
@@ -1,13 +1,14 @@
---
title: "Rewrite a git commit history"
-linkTitle: "Rewrite a git commit history"
date: 2018-03-05
-description: >
- Rewrite a git commit history
+description: How to rewrite a git commit history
+tags:
+ - git
---
+## git filter-branch
+
Here is how to rewrite a git commit history, for example to remove a file :
{{< highlight sh >}}
git filter-branch –index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all
{{< /highlight >}}
-
diff --git a/content/blog/commands/ipmi.md b/content/blog/commands/ipmi.md
index 93ca26d..2db75ee 100644
--- a/content/blog/commands/ipmi.md
+++ b/content/blog/commands/ipmi.md
@@ -1,11 +1,12 @@
---
title: "ipmitool"
-linkTitle: "ipmitool"
date: 2018-03-05
-description: >
- ipmitool
+description: some ipmitool command examples
+tags:
+ - simple utilities
---
+## Usage examples
- launch ipmi shell : `ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U <ipmi_user> shell`
- launch ipmi remote text console : `ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U <ipmi_user> sol activate`
- Show local ipmi lan configuration : `ipmitool lan print`
@@ -16,4 +17,3 @@ ipmitool lan set 1 ipaddr 10.31.149.39
ipmitool lan set 1 netmask 255.255.255.0
mc reset cold
{{< /highlight >}}
-
diff --git a/content/blog/commands/mdadm.md b/content/blog/commands/mdadm.md
index 1dbc3f8..1645c6c 100644
--- a/content/blog/commands/mdadm.md
+++ b/content/blog/commands/mdadm.md
@@ -1,9 +1,10 @@
---
title: "mdadm"
-linkTitle: "mdadm"
date: 2011-11-15
-description: >
- mdadm
+description: some mdadm command examples
+tags:
+ - linux
+ - simple utilities
---
## Watch the array status
@@ -39,4 +40,3 @@ mdadm --stop /dev/md0
mdadm --zero-superblock /dev/sda
mdadm --zero-superblock /dev/sdb
{{< /highlight >}}
-
diff --git a/content/blog/commands/megacli.md b/content/blog/commands/megacli.md
index 8eb32a8..10e2a85 100644
--- a/content/blog/commands/megacli.md
+++ b/content/blog/commands/megacli.md
@@ -1,11 +1,11 @@
---
title: "MegaCLI"
-linkTitle: "MegaCLI"
date: 2018-03-05
-description: >
- MegaCLI for dell hardware investigations
+description: MegaCLI for dell hardware investigations
+tags:
+ - linux
---
+## Some command examples
- `megacli -LDInfo -LALL -aALL|grep state`
- `MegaCli -PDlist -a0|less`
-
diff --git a/content/blog/commands/omreport.md b/content/blog/commands/omreport.md
index b3d0ffd..a5d90e5 100644
--- a/content/blog/commands/omreport.md
+++ b/content/blog/commands/omreport.md
@@ -1,9 +1,9 @@
---
title: "omreport"
-linkTitle: "omreport"
date: 2018-03-05
-description: >
- omreport
+description: Some omreport command examples
+tags:
+ - linux
---
## Your raid status at a glance
@@ -17,4 +17,3 @@ omreport storage vdisk
omreport storage pdisk controller=0 vdisk=0
omreport storage pdisk controller=0 pdisk=0:0:4
{{< /highlight >}}
-
diff --git a/content/blog/commands/qemu-nbd.md b/content/blog/commands/qemu-nbd.md
index ea09658..0402876 100644
--- a/content/blog/commands/qemu-nbd.md
+++ b/content/blog/commands/qemu-nbd.md
@@ -1,11 +1,14 @@
---
title: "qemu-nbd"
-linkTitle: "qemu-nbd"
date: 2019-07-01
-description: >
- qemu-nbd
+description: qemu-nbd usage example
+tags:
+ - linux
+ - virtualization
---
+## Usage example
+
{{< highlight sh >}}
modprobe nbd max_part=8
qemu-nbd -c /dev/nbd0 image.img
@@ -14,4 +17,3 @@ mount /dev/nbd0p1 /mnt # or vgscan && vgchange -ay
umount /mnt
qemu-nbd -d /dev/nbd0
{{< /highlight >}}
-
diff --git a/content/blog/commands/qemu.md b/content/blog/commands/qemu.md
index b3beb2c..2a982e0 100644
--- a/content/blog/commands/qemu.md
+++ b/content/blog/commands/qemu.md
@@ -1,9 +1,10 @@
---
title: "Qemu"
-linkTitle: "Qemu"
date: 2019-06-10
-description: >
- Qemu
+description: Some simple qemu command usage
+tags:
+ - linux
+ - virtualization
---
## Quickly launch a qemu vm with local qcow as hard drive
diff --git a/content/blog/commands/rrdtool.md b/content/blog/commands/rrdtool.md
index 33f54dc..05cc0b1 100644
--- a/content/blog/commands/rrdtool.md
+++ b/content/blog/commands/rrdtool.md
@@ -1,9 +1,9 @@
---
title: "rrdtool"
-linkTitle: "rrdtool"
date: 2018-09-25
-description: >
- rrdtool
+description: How to graph manually with rrdtool
+tags:
+ - simple utilities
---
## Graph manually