 |
| Modules |  |
| Who's Online |  |
There are currently, 12 guest(s) and 0 member(s) that are online.
You are Anonymous user. You can register for free by clicking here | |
| Promotion |  |
| HotLinks |  |
 |  |
 | Cool commands to try on CLI |
LinuxGuru writes "I was looking for a CLI (Command Line Interface) way to add of the space used on my hard drives and found this cool site.
http://www.pixelbeat.org/cmdline.html with lots of fun commands to try on the CLI.
The answer to what I was doing. The program df shows the size, used
space and free space of your hard drives. The program bc is a CLI math
program. The programs grep and gawk allow you to select only the parts
you want to use.
royce@Hydra[~] #/bin/df -h | head -n 1; /bin/df -h |grep hda
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 54G 43G 7.8G 85% /
/dev/hda1 20G 2.2G 18G 12% /mnt/other
royce@Hydra[~] #/bin/df | head -n 1; /bin/df |grep hda
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 55866816 44859624 8169312 85% /
/dev/hda1 20482840 2298176 18184664 12% /mnt/other
So to see the total size in Bytes
/bin/df | grep hda |gawk '{print $2}' | (tr 'n' +; echo 0) | bc
So to see the total size in Giga Bytes
expr $(expr $(/bin/df | grep hda |gawk '{print $2}' | (tr 'n' +; echo 0) | bc) / 1024) / 1024
So to see the used space in Bytes
/bin/df | grep hda |gawk '{print $3}' | (tr 'n' +; echo 0) | bc
So to see the used space in Giga Bytes
expr $(expr $(/bin/df | grep hda |gawk '{print $3}' | (tr 'n' +; echo 0) | bc) / 1024) / 1024
So to see the free space in Bytes
/bin/df | grep hda |gawk '{print $4}' | (tr 'n' +; echo 0) | bc
So to see the free space in Giga Bytes
expr $(expr $(/bin/df | grep hda |gawk '{print $4}' | (tr 'n' +; echo 0) | bc) / 1024) / 1024
To format the output
royce@Hydra[~]
#echo $(expr $(expr $(/bin/df | grep hda |gawk '{print $4}' | (tr 'n'+; echo 0) | bc) / 1024) / 1024)GB free space
25GB free space
royce@Hydra[~] #
Happy hacking :)"
|
|
|
 Posted by Admin on Friday, April 24 @ 09:24:10 MDT  (1618 reads)
(Read More... | Score: 0)
 |
|
 | See Spot exec! Part 2 |
LinuxGuru writes "The basics of bash script programming.
In this issue I show you how to work with
- exit codes
- STDOUT and STDERR streams
- the PID of spawned programs
- the argument stack
"
|
|
|
 Posted by Admin on Saturday, August 27 @ 11:02:05 MDT  (2393 reads)
(Read More... | 3928 bytes more | Score: 0)
 |
|
 | Automatic USB icon for xtdesktop |
LinuxGuru writes "The real point of this is the power of bash and how to use it to restart a program. I was in need of a way to restart a program for any user on any desktop so this is what I did.
"
Note: These scripts are licesnsed under the GNU GPL.
|
|
|
 Posted by Admin on Tuesday, August 23 @ 13:15:49 MDT  (5091 reads)
(Read More... | 3973 bytes more | Score: 4)
 |
|
 | The FLOSS rescue CD |
LinuxGuru writes "If you ever lose you lilo or grub master boot record you can use a
FLOSS or some other live CD like
Knoppix or
MandrakeMove to recover it.
Here are some simple steps to do that."
|
|
|
 Posted by Admin on Thursday, December 30 @ 10:31:45 MST  (1875 reads)
(Read More... | 3359 bytes more | Score: 0)
 |
|
 | See Spot exec! Part 1 |
LinuxGuru writes "The basics of bash script programming.
The BASH shell is to many Linux users nothing more then a prompt but it has a long history of being a powerfull tool not only as a shell but also as a script engine. The simple beauty of BASH is in how it is able to work with the system commands and command line programs that are already available.
This is part 1 in a series of LLUG posts on how you can use your BASH system to make amazing shell scripts to do a great many things from automating a feature on a server to creating simple programs to help out your desktop.
"
|
|
|
 Posted by Admin on Wednesday, October 06 @ 08:54:27 MDT  (1668 reads)
(Read More... | 5900 bytes more | Score: 0)
 |
|
 | Using Impress-ive Charts In OpenOffice.org |
LinuxGuru writes "By Rob Reilly at www.linuxplanet.com
Anybody that does presentations will someday need to use a chart. A manager needs charts to show production numbers and profits. A scientist or trainer needs charts to show facts, figures and results. A sales seminar leader needs charts to explain sales figures. So, what's involved in getting these nifty things into your OpenOffice.org-based slide show?"
|
|
|
 Posted by Admin on Tuesday, July 20 @ 08:51:21 MDT  (1217 reads)
(Read More... | 527 bytes more | Score: 0)
 |
|
 | Sending GUI programs to other desktops. |
LinuxGuru writes "A very cool thing about Linux is the ubiquitous flow of data between programs including command line and graphical programs.
In Linux you can run as many destops as you have RAM enough for. You can run Gnome, KDE and WindowMaker all at the same time. They would be ID'd like so :0.0, :1.0 and :2.0
Try this simple program to send a graphical pop-up message to desktop :0.0 running on a different computer.
This is also a fun prank to play on people.
"
|
|
|
 Posted by Admin on Thursday, July 15 @ 11:46:39 MDT  (1255 reads)
(Read More... | 2153 bytes more | Score: 0)
 |
|
 | Security issues for everyone. |
Anonymous writes "With a flood of Win32 viruses wreaking havoc on the Internet it is important to remember that any Win32 system inside you network is a potential security threat to your Linux systems. An infected Win32 system can do a lot of damage to files and data that your Linux servers are providing to that Win32 desktop."
|
|
|
 Posted by Admin on Tuesday, January 27 @ 13:27:06 MST  (1222 reads)
(Read More... | 702 bytes more | Score: 0)
 |
|
 | Finding a good Linux laptop. |
|
|
 Posted by Admin on Monday, December 08 @ 13:41:57 MST  (1336 reads)
(Read More... | 1523 bytes more | Score: 0)
 |
|
 | OpenOffice Power Tips: The SQL contact manager |
Anonymous writes "How many people do you know that are having a birthday this month? A simple SQL query can tell you. Do you use your contact manager for business? Plug your contacts database in to OpenOffice and increase your productivity. Anyone that uses a computer to send and receive email is using a contact manager. Many of us are using a very powerful contact manager but not using it to it's full potential. Now thanks to the power of OpenOffice you can make your contact manager do some very cool tricks.
"
|
|
|
 Posted by Admin on Wednesday, October 01 @ 14:44:13 MDT  (1608 reads)
(Read More... | 643 bytes more | Score: 4)
 |
|
| 
|