Next
Previous

Wednesday, July 10, 2013

3 - Creating & Deleting a directory

Posted in ,


Today lets talk about creating and deleting directories.

mkdir - create a new directory.

command syntax

mkdir [option] directory

directory - give the name of the directory you wish to create.

options used with mkdir

-m mode - Set permission mode (as in chmod), not rwxrwxrwx - umask.
-p - No error if existing, make parent directories as needed.
-v - Print a message for each created directory
-Z - (SELinux) set security context to CONTEXT

ex :


creates a directory named "dirName"




"dirName" named directory has been created.

ex :


This example use the -m option to set the permissions to all users having read, write, and execute permissions.
Shows the permission of "dirName" directory

changing permission through GUI


chmod command is used to change the permission of a file through CLI. In the future lets talk about chmod.

r - Read the file.
w - Write or edit the file.
x - Execute or run the file as a program.

rmdir - Remove directory(s)

command syntax

rmdir [option] directory

directory - give the name of the directory you wish to delete.

options used with rmdir

--ignore-fail-on-non-empty - ignore each failure that is solely because a directory is non-empty.
-p, --parents - Remove DIRECTORY and its ancestors. E.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'.
-v, --verbose - output a diagnostic for every directory processed.
--version - output version information and exit.

ex :


delete "dirName" directory.




"dirName" directoty has been deleted.

If there were files inside "dirName" directory "rmdir dirName" command wont allow us to delete that directory.



Therefore to remove a directory, even if files existed within that directory use
rm -rf directory/

ex :


If you gain some knowledge from this lesson and if you think this is useful leave a comment to encourage us. Good comments or bad comments all are important to usLets meet from a new lesson soon, have a nice day!!!

Thursday, July 4, 2013

Fedora 19 (Schrödinger's Cat) Released

Posted in ,


Fedora 19 "Schrödinger's Cat" has been released today, featuring the latest stable GNOME 3.8, a new initial setup and other interesting changes.

New initial setup

The latest Fedora 19 includes a new initial setup (which was supposed to be introduced with Fedora 18, but was delayed) which allows users to perform some basic actions the first time they boot into Fedora. Users can select the language, keyboard layout, add cloud services and, if no user has been created during the installation process, a new user can easily be created from this initial setup:




After the initial setup completes, an animation displaying some GNOME Shell basic usage is displayed in full-screen


GNOME 3.8

  • Fedora 19 ships with GNOME 3.8, which comes with numerous changes and new features, including: new Activities Overview applications view.
  • overhauled search which can now include results from applications.
  • new Privacy, Notifications and Search GNOME Settings panels.
  • a new Classic mode is available for GNOME 3.8, replacing the old GNOME fallback mode. This offers a GNOME2-like layout by using some extensions on top of GNOME Shell. To install it, see below.
  • GNOME Clocks and Weather, two new application added with GNOME 3.8, are available by default in Fedora 19.
  • GNOME Documents has received an embedded edit mode for Google Docs, presentation mode and more.
  • Web (Epiphany) has switched to WebKit2 and now includes an incognito mode, new search UI and supports GTK+2 plugins, including Adobe Flash. Web is not included by default in Fedora 19 though.


Here are some Fedora 19 screenshots in which you can see some of these new GNOME 3.8 features:



Other changes

Other changes in Fedora 19 include:

  • File Roller can extract RAR archive after installing the "unar" package, a free and open source command line tool that's part of The Unarchiver project.
  • MariaDB is now the default MySQL option in Fedora.
  • 3D modeling and printing tools are available in the repositories.
  • Updated ModemManager with better support for multi-mode devices like Qualcomm Gobi WWAN cards and other devices that support the CDMA/EVDO/LTE standards, the GSM/UMTS/LTE standards, or devices that can support either.
  • firewalld (the default Fedora firewall) improvements.
  • more...


Default applications in Fedora 19

Fedora 19 ships with Nautilus 3.8.2, Gedit 3.8.2, Totem 3.8.2, GNOME Documents 3.8.3, GNOME Contacts 3.8.2, GNOME Boxes 3.8.3, Evolution 3.8.3, Cheese 3.8.2, Empathy 3.8.3, GNOME Clocks 3.8.2, GNOME Weather 3.8.2, LibreOffice 4.1 beta 2, Firefox 21, Transmission 2.77, Rhythmbox 2.99.1 and Shotwell 0.14.1, on top of GNOME Shell 3.8.3, GTK 3.8.2, Linux Kernel 3.9.5 (though an update to 3.9.8 is already available), Mesa 9.2 and Xorg server 1.14.1.


Source : webupd8.org

If you gain some knowledge from this article and if you think this is useful leave a comment to encourage us. Good comments or bad comments all are important to us
Lets meet from a new article soon, have a nice day!!!

Friday, June 28, 2013

1 - Introduction to Shell Scripting

Posted in , ,

What is Linux Kernel ?

Kernel is the hart of Linux OS. It manages the resources of OS,

 I/O management
 Process management
 Device management
 File management
 Memory management

Kernal decides who will use this resource, for how long and when.

The kernel acts as an intermediary between the computer hardware and various programs/application/shell.

What is Linux Shell ?

Computer understand the binary language. It consists of 0s and 1s. In the past people used binary language to provide instruction to computers. It is difficult to read and write in machine language. So in Operating System there is a special program called "Shell" which accepts your instructions or commands in English(mostly), if you gave a valid command it passes it to kernel. Shell is not part of system kernel, but uses the system kernel to execute programs, create files etc.

Shell is a user program or it's environment provided for user interaction. Shell is an command language interpreter that executes commands read from the standard input device (keyboard) or from a file.

Several shell are available :

BASH ( Bourne-Again SHell )
Developed by : Brian Fox and Chet Ramey
Where : Free Software Foundation
Remark : Most common shell in Linux. It's Freeware shell.

CSH (C SHell)
Developed by : Bill Joy
Where : University of California (For BSD)
Remark : The C shell's syntax and usage are very similar to the C programming language.

KSH (Korn SHell)
Developed by :  David Korn
Where : AT & T Bell Labs

TCSH
Developed by : See the man page. Type $ man tcsh
Remark : TCSH is an enhanced but completely compatible version of the Berkeley UNIX C shell (CSH).

To find all available shells in your system type following command 
cat /etc/shells

Each shell does the same job, but each understand a different command syntax and provides different built-in functions.

In MS-DOS, Shell name is COMMAND.COM which is also used for same purpose, but it's not as powerful as our Linux Shells are!

Any of the above shell reads command from user (via Keyboard or Mouse) and tells Linux Os what users want. If we are giving commands from keyboard it is called command line interface ( Usually in-front of $ prompt, This prompt is depend upon your shell and Environment that you set or by your System Administrator, therefore you may get different prompt ).

To find your current shell type following command
echo $SHELL

Normally shells are interactive. It means shell accept command from you (via keyboard) and execute them.

Scripts are collections of commands that are stored in a file. The shell can read this file and act on the commands as if they were typed at the keyboard. Scripts help us to automate a wide range of tasks.

Typical operations performed by shell scripts include file manipulation, program execution, and printing text. Shell provides a variety of useful programming features to make your scripts truly powerful.

reference :
Linux Shell Scripting Tutorial v1.05r3
Writing Shell Scripts

If you gain some knowledge from this lesson and if you think this is useful leave a comment to encourage us. Good comments or bad comments all are important to usLets meet from a new lesson soon, have a nice day!!!