top in Batch Mode
Tagged with: batch, cli, command, filler, Linux, top
Saturday, July 25th, 2009 11:52 PM
Run top in batch mode
top -b -d 10 -n 3
Run top in batch mode
top -b -d 10 -n 3
This is the command used to post a new task to the nexty GTD tool.
curl --basic --user "binnyva:password" --cookie-jar /tmp/nexty-cookies.txt --data-ascii "task=`echo $@|tr ' ' '+'`&layout=cli" "http://nexty.org/tasks/add.php"
Post a status update to identi.ca using just curl
curl --basic --user binnyva:PASSWORD --data-ascii "status=The new status goes here" http://identi.ca/api/statuses/update.xml
You can create a directory tree using just one command in Linux
mkdir -p /tmp/dir1/dir2
Show files and directory containing numbers
ls *[0-9]*
I run this command when I go for lunch or something – these commands take a while to run.
sudo /bin/bash /usr/sbin/makewhatis -w; sudo /usr/bin/updatedb; sudo /home/binnyva/Software/System/chkrootkit-0.47/chkrootkit
This command shows the kernel modules that are currently loaded.
# lsmod
Module Size Used by
vboxdrv 55088 0
autofs4 20421 2
ipt_MASQUERADE 6721 1
iptable_nat 9669 1
nf_nat 18669 2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4 11717 2 iptable_nat
nf_conntrack 51977 4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4
....
du shows the ‘disk usage’ – the space taken up by the files and folders in the current directory.
du -bh | more
free gives the Memory info (in kilobytes).
free
#Output
total used free shared buffers cached
Mem: 2075000 667508 1407492 0 25988 352076
-/+ buffers/cache: 289444 1785556
Swap: 979924 0 979924
[tags][/tags]
The last command shows a history of logins…
last