Pages

Thursday, July 29, 2010

how to touch a file with current DATE as filename

hai try to use these commands to touch a file , with current date as filename

touch $(date)

but this may giv you a bad result, it may creates more files

so use this command

touch $(date +"%C%y%b%d")

C indicates Century 20 , ' y '  means year ,  'b' means month , 'd' is date

 

Linux File Structure

In the Linux file structure files are grouped according to purpose. Ex: commands, data files, documentation. Parts of a Unix directory tree are listed below. All directories are grouped under the root entry "/". That part of the directory tree is left out of the below diagram. See the FSSTND standard (Filesystem standard).
  • root - The home directory for the root user
  • home - Contains the user's home directories along with directories for services
    • ftp
    • HTTP
    • samba
    • george
  • bin - Commands needed during bootup that might be needed by normal users
  • sbin - Like bin but commands are not intended for normal users. Commands run by LINUX.
  • proc - This filesystem is not on a disk. It is a virtual filesystem that exists in the kernels imagination which is memory.
    • 1 - A directory with info about process number 1. Each process has a directory below proc.
  • usr - Contains all commands, libraries, man pages, games and static files for normal operation.
    • bin - Almost all user commands. some commands are in /bin or /usr/local/bin.
    • sbin - System admin commands not needed on the root filesystem. e.g., most server programs.
    • include - Header files for the C programming language. Should be below /user/lib for consistency.
    • lib - Unchanging data files for programs and subsystems
    • local - The place for locally installed software and other files.
    • man - Manual pages
    • info - Info documents
    • doc - Documentation
    • tmp
    • X11R6 - The X windows system files. There is a directory similar to usr below this directory.
    • X386 - Like X11R6 but for X11 release 5
  • boot - Files used by the bootstrap loader, LILO. Kernel images are often kept here.
  • lib - Shared libraries needed by the programs on the root filesystem
    • modules - Loadable kernel modules, especially those needed to boot the system after disasters.
  • dev - Device files
  • etc - Configuration files specific to the machine.
    • skel - When a home directory is created it is initialized with files from this directory
    • sysconfig - Files that configure the linux system for devices.
  • var - Contains files that change for mail, news, printers log files, man pages, temp files
    • file
    • lib - Files that change while the system is running normally
    • local - Variable data for programs installed in /usr/local.
    • lock - Lock files. Used by a program to indicate it is using a particular device or file
    • log - Log files from programs such as login and syslog which logs all logins and logouts.
    • run - Files that contain information about the system that is valid until the system is next booted
    • spool - Directories for mail, printer spools, news and other spooled work.
    • tmp - Temporary files that are large or need to exist for longer than they should in /tmp.
    • catman - A cache for man pages that are formatted on demand
  • mnt - Mount points for temporary mounts by the system administrator.
  • tmp - Temporary files. Programs running after bootup should use /var/tmp.

Wednesday, July 28, 2010

Linux System Management



Runtime level management

exit
Terminates the shell.
halt
Stop the system.
init
Process control initialization.
initscript
Script that executes inittab commands.
logout
Log the user off the system.
poweroff
Brings the system down.
reboot
Reboot the system.
runlevel
List the current and previous runlevel.
setsid
Run a program in a new session.
shutdown
If your system has many users, use the command "shutdown -h +time message", where time is the time in minutes until the system is halted, and message is a short explanation of why the system is shutting down.
# shutdown -h +10 'We will install a new disk. System should be back on-line in three hours.'
telinit
By requesting run level 1 a system can be taken to single user mode.

System Configuration tools

ctrlaltdel
Set the function of the ctrl alt del combination.
isapnp
Configure ISA plug and play devices.
kbdconf
A Redhat Linux tool which configures the /etc/sysconfig/keyboard file which specifies the location of the keyboard map file. This is a GUI based tool.
kbdrate
Set the keyboard repeat rate and delay time.
kernelcfg
A Redhat GUI kernel configuration tool, Start X, then run it from a console session.
linuxconf
Redhat's GUI linux system configuration tool.
lspci
List all pci devices.
mesg
Control write access to your terminal.
mouseconfig
A Redhat Linux tool used to configure the /etc/sysconfig.mouse file. This is a GUI tool.
ndc
Script file used to restart, stop, start the DNS server.
Printtool
Redhat's GUI printer configuration tool.
quota
Display disk usage and limits.
quotacheck
Scan a filesystem for disk usages.
quotaoff
Turn file system quotas off.
quotaon
Turn file system quotas on.
samba
Script file used to stop, start, restart samba services when not run using inetd.
setpci
Configure pci devices.
setserial
Set/get serial port information.
setterm
Set terminal attributes.
setup
Set up devices and file systems.
stty
Used to configure and print the console devices.
swapon
Enable devices and files for paging and swapping.
swapoff
Disable devices and files for paging and swapping.
timeconfig
A Redhat Linux tool used to configure the /etc/sysconfig/clock file. This is a GUI tool used to set timezone and whether or not the clock is set to GMT time.
tset
Used to initialize terminals.

System Information

arch
Print machine architecture.
df
Shows disk free space.
du
Shows disk usage.
free
Display used and free memory on the system.
ipcrm
Provide information on ipc facilities.
ipcs
Same as ipcrm.
lsdev
Display information about installed hardware via files in the /proc directory.
lsof
List open files.
lspci
List PCI devices .
pnpdump
Lists ISA plug and play devices resource information.
procinfo
Display system status gathered from proc.
pstree
Display a tree of processes.
runlevel
Find the current and previous system runlevel.
strace
Trace ssytem calls and signals for a binary program.
stty
Change and print terminal line settings.
tload
Prints a graphic representation of the system load average.
tty
Print the filename of the terminal connected to standard input.
uname
Print system information, Prints Linux.
vmstat
Report virtual memory statistics.
xcpustate
Displays CPU states (idle, nice, system, kernel) statistics. Runs in X?

System Logging

klogd
Kernel log daemon which intercepts and logs Linux kernel messages.
logger
Make entries in the system log.
syslogd
Linux system logging utilities.
sysklogd
Linux system logging utilities.

System time

cal
Calendar.
clock
Used to change or get current time. The command "clock -–w" sets the hardware clock.
date
Print or set the system date and time.
hwclock
Set or read the hardware CMOS clock.
timed
Time server daemon to synchronize the host's time with other machines, normally invoked at boot time from the rc(8) file.
timedc
Timed control program.
tzset
Used to change the users private time zone by setting the TZ environment variable.
uptime
Reports how long the system has been running.
zdump
Prints the current time in each zonename named on the command line.
zic
Reads text from files named on the command line and creates time conversion files.

X Management and programs

SuperProbe
Probe video hardware.
Xconfigurator
The Redhat tool used during system setup to configure X.
xconsole
Displays messages usually sent to /dev/console.
xf86config
Older version of XF86Setup.
XF86Setup
A newer X configuration program with a GUI interface which modifies the "/etc/X11/XF86Config" configuration file.
xvidtune
This program will test video modes on the fly without modification to your X configuration. Read the usr/X11R6/lib/X11/doc/VideoModes.doc file before running this program.

Tuesday, July 27, 2010

Basics of Cloud computing

Introduction:-   

Definition of cloud computing is that, an internet based computing model whereby shared resources,software's,information's etc are provided to computers or any other devices on demand


Another definition :- A cloud is a pool of virtualized computer resources, A cloud can
  •  Host a variety of different workloads, including batch-style back-end jobs and interactive,  user-facing applications
  • Allow workloads to be deployed and scaled-out quickly through the rapid provisioning of  virtual machines or physical machines
  • Support redundant, self-recovering, highly scalable programming models that allow  workloads to recover from many unavoidable hardware/software failures
  • Monitor resource use in real time to enable rebalancing of allocations when needed




Starts :- It can be the ability to rent a server or a thousand servers and run a geophysical modeling application on the most powerful systems available anywhere. It can be the ability to rent a virtual server,load software on it, turn it on and off at will, or clone it ten times to meet a sudden workload demand. It can be storing and securing immense amounts of data that is accessible only by authorized applications and users. It can be supported by a cloud provider that sets up a platform that includes the OS, Apache, a MySQL™ database,Perl, Python, and PHP with the ability to scale automatically in response to changing workloads. Cloud computing can be the ability to use applications on the Internet that store and protect data while providing a service (on-demand services) — anything including email,sales force automation and tax preparation. It can be using a storage cloud to hold application, business, and personal data. And it can be the ability to use a handful of Web services to integrate photos, maps, and GPS information to create a mashup in customer Web browsers.