[ale] how do I view system logs / check disk space

Randy Hagan randy at haganzone.com
Thu Feb 24 12:54:49 EST 2011


 Hey, finally a question I may be able to answer. ;-)

 I'm sure there are some 3rd party applications out there that would 
 help with log files; however, I just use the command line.

 To check the disk usage, I use the df command.  I use the -h flag to 
 make it easier to read.

 [me at localhost ~]$ df -h
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/hda1             144G   17G  120G  12% /
 tmpfs                 993M   12K  993M   1% /dev/shm

 I use du (also with the -h flag) to see the size of files/directores.  
 You can use the -s flag to just see the total in the directory

 [me at localhost ~]$ du -sh
 8.3G    .

 Use a directory name to get the disk usage of the directory

 [me at localhost ~]$ du Downloads/ -sh
 6.9G    Downloads/

 You can remove the -s flag to get a listing of all files under the 
 directory.

 I created a simple perl script that check the secured log file for 
 accepted & sudo connections -- cat the file and highlight the accepted & 
 sudo lines.  You are free to use it and modify it to suit your needs.

 I have a blog, which is just a place for me to remember things, that 
 has the script.  If you have Perl loaded you could try it.

 http://haganzone.com/blog/?p=33

 I'm sure others will probably have better answers to your question, but 
 these work for me.

 You can type man du, or man df to get other options.

 Regards,

 Randy


 On Thu, 24 Feb 2011 12:17:08 -0500, Ron Frazier 
 <atllinuxenthinfo at c3energy.com> wrote:
> I was trying to view some of the logs in /var/log with gedit.  I have
> some questions.
>
> Is there a gui based log viewer where I can pick the log from a list 
> and
> view it quickly?
>
> There are some logs such as wtmp which gedit cannot edit.  Is there a
> way to access those.
>
> Also, what's the command to check how much disk space you're using 
> and
> how much each thing in a directory is using?
>
> Sincerely,
>
> Ron

> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list