Friday, October 25, 2013


Sticky bit is a bit set in permission of a file or directory to give special access –rights to user. When we set the sticky bit for any executable file, it will remain in swap space after the process exited. It will help to reduce time of execution in repeatedly used programs. So, we can set this sticky bit for frequently used programs like editors, commands etc. So, execution of them will be faster as compared to without sticky bit.
Main important use of sticky bit is on directory, when we set sticky bit for directory then files reside in the directory can delete or rename by owner only. This is helpful not to give access for renaming or deletion to unauthorized user. When sticky bit is not set for directory then any user having permission to write and execute on directory can rename and delete files inside the directory.

Sticky bit behavior or feature changes as per operating system. Linux Kernel ignores the sticky bit on files, it considers only on directories. In HP-UX work on sticky bit as above mentioned. In AIX, if we set the sticky bit for directory then only owner can link or unlink the directory or files specified in the directory.

How to set Sticky bit on file/directory in Linux?

We will set sticky bit by chmod command. For this purpose, we can use octal mode or by its symbol ‘t’. lets go through the example.

//Check the permissions of directory sticky
redhat@localhost:~/mywork$ ls -l
total 4
drwxr-xr-x 2 redhat adm 4096 2013-10-24 15:36 sticky
redhat@localhost:~/mywork$ ls -l sticky/                            //inside directory permissions
total 8
-rwxr-xr-x 1 redhat adm 57 2013-10-24 15:35 stickybit.sh
-rwxr-xr-x 1 redhat adm 57 2013-10-24 15:36 stickybit.sh_bak
//Adding sticky bit in permission by below syntax ..or use - chmod 1755 sticky
redhat@localhost:~/mywork$ chmod +t sticky/                         
redhat@localhost:~/mywork$ ls -l sticky/
total 8
-rwxr-xr-x 1 redhat adm 57 2013-10-24 15:35 stickybit.sh
-rwxr-xr-x 1 redhat adm 57 2013-10-24 15:36 stickybit.sh_bak
redhat@localhost:~/mywork$ ls -l
total 4
drwxr-xr-t 2 redhat adm 4096 2013-10-24 15:36 sticky
//In above line sticky bit added in permissions
redhat@localhost:~/mywork$


Now we have set the sticky bit to directory. Now we will try to remove file or script inside the directory.

//Changing the user. Sandeep and redhat having same group.
redhat@localhost:~/mywork/sticky$ su - Sandeep
Password:
Sandeep@localhost:~$
Sandeep@localhost:~$ pwd
/home/Sandeep
Sandeep@localhost:~$ cd ../redhat            //Change Directory to that sticky bit directory
Sandeep@localhost:/home/redhat$ ls
mywork
Sandeep@localhost:/home/redhat$ ls -l
total 4
drwxr-xr-x 3 redhat adm 4096 2013-10-24 15:39 mywork
Sandeep@localhost:/home/redhat$ cd mywork/
Sandeep@localhost:/home/redhat/mywork$ ls -l
total 4
drwxr-xr-t 2 redhat adm 4096 2013-10-24 15:36 sticky
Sandeep@localhost:/home/redhat/mywork$
Sandeep@localhost:/home/redhat/mywork$ cd sticky/
Sandeep@localhost:/home/redhat/mywork/sticky$ ls
stickybit.sh  stickybit.sh_bak
//Trying to remove sticky bit set directory content ..getting error permission denied
Sandeep@localhost:/home/redhat/mywork/sticky$ rm stickybit.sh
rm: remove write-protected regular file `stickybit.sh'? y
rm: cannot remove `stickybit.sh': Permission denied
Sandeep@localhost:/home/redhat/mywork/sticky$

Permission denied while removing the file which resides into the directory whose sticky bit has been set already. This is the actual use of sticky bit on directory.

How to remove sticky bit of directory/file ?

We need to login by redhat or root user before removing sticky bit then only we can remove the Sticky bit.

redhat@localhost:~/mywork$ ls –l
total 4
drwxr-xr-t 2 redhat adm 4096 2013-10-24 15:36 sticky
//use below syntax or use – chmod 755 sticky
redhat@localhost:~/mywork$ chmod -t sticky/
redhat@localhost:~/mywork$ ls -l
total 4
drwxr-xr-x 2 redhat adm 4096 2013-10-24 15:36 sticky
redhat@localhost:~/mywork$


Drop an email if you have any query regarding the Linux issue or like our page on Facebook and post a query.
Posted by Machindra Dharmadhikari On 10/25/2013 09:29:00 PM No comments READ FULL POST

Wednesday, October 23, 2013

Sticky bit concept and implementation                                      Check CPU usage of file system

SetUID:

SetUID is a set User ID upon execution. We can identify SetUID bit is set or not in permissions of file by long listing the details of file as below.

[linuxconcepts@localhost test]$ cat > setuid.sh
#!/bin/sh
echo "SET USER ID BIT";
date
[linuxconcepts@localhost test]$
[linuxconcepts@localhost test]$ ls -l setuid.sh
-rw-rw-r--. 1 linuxconcepts linuxconcepts 39 Oct 23 12:08 setuid.sh
[linuxconcepts@localhost test]$ chmod 4755 setuid.sh
[linuxconcepts@localhost test]$ ls -l setuid.sh
-rwsr-xr-x. 1 linuxconcepts linuxconcepts 39 Oct 23 12:08 setuid.sh
[linuxconcepts@localhost test]$
//We can set setUID bit by following method as well
[linuxconcepts@localhost test]$ touch setuid1.sh
[linuxconcepts@localhost test]$ ls -l setuid1.sh
-rw-rw-r--. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$ chmod u+s setuid1.sh
[linuxconcepts@localhost test]$ ls -l setuid1.sh
-rwsrw-r--. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$

We can see ‘s’ letter in permission of a setuid.sh file when we change permissions to 4755. We use 4 before actual permission digit to setUID bit to any file.

Benefit: When we set the setUID bit in linux then that script will execute with its owner’s permission. Means if any user is executing that script who have execution permission then it will execute with owner’s permission.

Generally, setUID bit is disabled in most of unix like operating systems because it is unsecure and it gives full access to execute the script.

We can remove setUID bit as follows:

[linuxconcepts@localhost test]$ chmod u-s setuid1.sh
[linuxconcepts@localhost test]$ ls -l setuid1.sh
-rw-rw-r--. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$
SetGID :

SetGID is a set group ID upon execution. It is same as setUID. But setUID is for user and setGID bit is in linux is for group. It can bet set and remove as follows.

[linuxconcepts@localhost test]$ ls -l setuid1.shroup
-rw-rw-r--. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$
[linuxconcepts@localhost test]$ chmod 2755 setuid1.sh
[linuxconcepts@localhost test]$  ls -l setuid1.sh
-rwxr-sr-x. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$ chmod u-s setuid1.sh
[linuxconcepts@localhost test]$ ls -l setuid1.sh
-rwxr-sr-x. 1 linuxconcepts linuxconcepts 0 Oct 23 13:22 setuid1.sh
[linuxconcepts@localhost test]$

Generally SetGID or SetUID bit is set for commands or service commands.

You might be interested in other posts. Have a look on it :

Jinfo command to get details about java process                  Jstat command in Linux
Posted by Machindra Dharmadhikari On 10/23/2013 09:41:00 PM No comments READ FULL POST

Tuesday, September 17, 2013

Mostly Asked interview questions                                             How to recover delete files in linux

There are many open source applications in Linux available for graphic designer or image editing purpose.  Some of them, I have mentioned below and I will come with detailed description about them in later articles.

InkScape:

Inkscape is an open source application for graphic designers. It can replace to Adobe Illustrator or Corel Draw. Actually, Inkscape is a vector graphics editor. Vector graphics means resolution is independent on description of the actual shapes and objects in the image.
Inkscape supports many advanced features like alpha blending, clones, markers, object creation (Paths, Rectangles, 3D boxes, Stars/Polygons, spirals, clones, text), Object Manipulation (moving of object), styling object (fill, stroke fill, opacity), operations on paths, text support, Rendering etc.
You can visit Inkscape official site here.

Blender:

Blender is an open source tool which mostly used for 3D graphics design, for creating animated films, interactive 3D applications and games etc. I will prefer this tool if you want to create 3D animation film or games. Blender is available for Linux as well as Windows.
Blender is providing wide variety of advanced features like 3D animation creation, smoke simulation, provides game engine, python scripting tool for game logic, importing/exporting from other formats, task automation and custom tools, camera and object tracking, 3D rendering, procedural and node based textures, as well as texture painting, projective painting, vertex painting, weight painting.



Blender is mostly used open source tool for graphic designing.

ImageMagick

ImageMagick is a open source tool used to create, edit, compose, add special effects in image, adjust image colors, draw lines or polygons, add text in image and many more. ImageMagick is generally used like Adobe Photoshop to edit and add special effects in image. It is not having functionality that much of adobe photoshop but it is good to use as an open source tool.
ImageMagick can help us to do things like image format conversion, transform, draw, add special effects, animations, add texts and comments, overlap an image over another, motion picture support, large image support.

Know more about the ImageMagick

GIMP

GIMP stands for GNU Image Manipulation Program. It is a good graphics manipulation package. GIMP is mostly used for image editing or while adding special effects in image.
GIMP has many features like photo enhancement, digital retouching, hardware support, file formats. It is available in Linux. Windows, Sun Soalris, Mac OS X, Free BSD.

Click here to know more about the GIMP.

AERO 

A Physically based simulation and animation system. AERO is a simulation program based on rigid body systems.

You might have interested in this post. Have a look on it :

How to run windows applications on Linux                          Check java process statistics in Linux
Posted by Machindra Dharmadhikari On 9/17/2013 09:47:00 PM No comments READ FULL POST

Tuesday, August 6, 2013

Advanced use of sed command                                                    useful tricks of sed command

UNIX is an open source operating system. It is a multiuser, multitasking operating system and developed in 1969 at AT & T’s laboratory. First, it was developed in assembly language but later it was recoded in ‘C’ language when this language developed by Dennis Ritchie. Actually, Unix is not an operating system, it is trademark which we use to say, is it unix like operating system or not. i.e. any operating follows the protocol which open group created for unix, it can be called as Unix operating system. E.g. BSD, HP-AX, Sequent, AIX.

Let’s talk about UNIX interview questions and its answers:

  • What is the difference between Linux and UNIX?

Ans -- If any operating system follows the UNIX protocols then we can say that it is a unix operating system. E.g. BSD, HP-AX etc. In case of Linux, actually Linux is a kernel which is most important part of operating system. Operating system comprised kernel, device drivers, desktop, other application etc. so, Linux is not an operating system, it is just a kernel which operating system uses like Red hat Linux, Open Suse etc. These operating system uses Linux kernel so, we can say that these operating systems are Linux.

  • Which command can we use to rename the file in Unix?

Ans -- In unix, there is no separate command to rename the file. We have to use ‘mv command’ to rename the file as below.
root@hello:~/hello/test# ls
fil5  file1  file2  file3  file4  test1
root@hello:~/hello/test#
root@hello:~/hello/test# mv file4 rename_file4
root@hello:~/hello/test# ls
fil5  file1  file2  file3  rename_file4  test1
root@hello:~/hello/test#

Use of command:
mv source_file destination_file

  • What is sed?

Ans -- Sed is a stream editor used to parse and transform the text. Sed does specified operations line by line on each line of input file or stream. Sed script either command line script or separate file.

  • Is sed command edit file?

Ans -- Yes. Sed command can edit the file. But this feature is available in Linux like operating only. This feature is not available in Solaris.

  • What is alias and how to do it? What is the use of it?

Ans -- Alias used to map some letters to specific command and instead of running that command, just type those letters. Please see below example to map ‘ls –l’ command to ‘ll’ letters.

root@01hw394566:~/ctier/test# alias
alias ls='ls --color=auto'
root@01hw394566:~/ctier/test#
root@01hw394566:~/ctier/test# alias ll='ls -l'
root@01hw394566:~/ctier/test# alias
alias ll='ls -l'
alias ls='ls --color=auto'
root@01hw394566:~/ctier/test#
root@01hw394566:~/ctier/test# ll
total 4
-rw-r--r-- 1 root root  0 2013-07-30 20:09 fil5
-rw-r--r-- 1 root root  0 2013-07-30 20:09 file1
-rw-r--r-- 1 root root  0 2013-07-30 20:09 file2
-rw-r--r-- 1 root root  0 2013-07-30 20:09 file3
-rw-r--r-- 1 root root  0 2013-07-30 20:09 rename_file4
-rw-r--r-- 1 root root 20 2013-07-30 20:09 test1
root@01hw394566:~/ctier/test#

  • Which daemons are running for NFS service?

Ans -- There are many NFS service daemons are running when we start the service. These daemons as follows:
Nfs
Nfsblock
Rpcbind
Rpc.mountd
Rpc.nfsd
Lockd
Rpc.statd
Rpc.rquotad
Rpc.idmapd

  • What is NFS port number and main configuration file?

Ans -- NFS service is using 2049 port and its main configuration file is /etc/exports.

  • What is port number for https?

Ans -- Https port number is 443.

  • How to strip all html tags from a file using sed command?

Ans – please find below example for stripping all html tags from a file using sed command.

root@01hw394566:~/ctier/test# cat test.html
<html>
<body>
<b>
Hello, Linux Administrator...!!!
</b>
</body>
</html>
root@01hw394566:~/ctier/test# sed -e 's/<[^>]*>//g' test.html



Hello, Linux Administrator...!!!



root@01hw394566:~/ctier/test# sed -e 's/<[^>]*>//g' -e '/^$/ d' test.html
Hello, Linux Administrator...!!!
root@01hw394566:~/ctier/test#

If you have seen in above example, we see that after stripping html tags, there are blank lines as it is. That’s why, we have used sed again to strip all blank lines.

  • What is inode?

Inode is a data structure found in unix file system. Each inode stores all the information about a file system object except data content and file name. We can see any file’s inode by command as “ls –i file name”. Inode is a unique in a file system. Inode contains following information:
File Type
Permissions (read, write, execute)
Owner
Group
File Size
File access, change, modification time
File deletion time
Number of links
Access control list

  • How do I see a inode number of file?

Ans – Please see below example.

root@01hw394566:~/ctier/test# ls –li
total 8
1206521 -rw-r--r-- 1 root root  0 2013-07-30 20:09 fil5
1206512 -rw-r--r-- 1 root root  0 2013-07-30 20:09 file1
1206515 -rw-r--r-- 1 root root  0 2013-07-30 20:09 file2
1206516 -rw-r--r-- 1 root root  0 2013-07-30 20:09 file3
1206559 drwxr-xr-x 2 root root 4096 2013-08-05 21:39 how
1206517 -rw-r--r-- 1 root root  0 2013-07-30 20:09 rename_file4
1206556 -rw-r--r-- 1 root root 20 2013-07-30 20:09 test1
1206560 -rw-r--r-- 1 root root 72 2013-08-05 20:22 test.html
root@01hw394566:~/ctier/test#

  • How to check port is open or not in Unix?

Ans— We can check port is open or not in Unix by netstat command. Please see below example for checking for port 80.
root@01hw394566:~/ctier/test# netstat -aeen | grep -w 80
tcp        0      0 127.0.0.1:80            0.0.0.0:*               LISTEN      0          8817
root@01hw394566:~/ctier/test#

If you see port 80 is tcp port. We have used double e option to get more detailed information about this port.
If you want to read more interview questions for Linux Administrator then click on below Link.
If you want to read more about shell scripting interview questions then click on below link:

Shell scripting interview questions and answers
Posted by Machindra Dharmadhikari On 8/06/2013 01:17:00 AM 4 comments READ FULL POST

Wednesday, July 31, 2013

Interview Questions for Linux Administrator                                             Linux Commands & Tools 

There are many devices or mount points mounted on system. But sometimes, we need to mount these mount points by unique ID. This case generally happens in network because in same network, might have same name mount points on different disks. To avoid this conflict, we will mount the mount points by their block ID which is always unique.

Before doing entry in /etc/fstab file, we need to find block ID of that file. We will do it by following commands as follows:

root@hello:~/myhome/test# blkid /dev/sda1
/dev/sda1: UUID="s91ed12-d675-46bf-a42f-07fgc2313505" TYPE="ext3"
root@hello:~/myhome/test#
root@hello:~/myhome/test# blkid /dev/sda3
/dev/sda3: UUID="k4161839-0b4d-45aa-b4d5-49c76g989628" TYPE="ext3"
root@hello:~/myhome/test#


As per above example, block id will show for only created partitions and we need to provide one parameter for this command and that is partition name.

After this, we can mount file system or partition on operating system with this block ID. It is permanent block id for this partition and it will never change. For each physical partition, there is unique block id for it.
Example of /etc/fstab file configuration by UUID.

# swap was on /dev/sda5 during installation
UUID=72c7301e-239b-44a0-9ccd-41693680d91c none            swap    sw              0       0


If you see in above example, we have used UUID for that device not device or partition name while mounting it in /etc/fstab file.

This method i.e. mounting by block ID is not useful for single home desktop because we will not enterprise grade storage or requirements. 

Chkconfig command in Linux                                                                                   Basic Uses of tar command
Posted by Machindra Dharmadhikari On 7/31/2013 11:48:00 PM No comments READ FULL POST
VI Editor                                                                                                   Useradd Command in Linux

There are many shells which are not coming by default in our operating system. So, that time we need to install it externally by downloading rpm package for Linux, deb package for Solaris, do apt-get for Ubuntu etc. But when we install this shell and somehow it is not working then we need configure it with following steps:

Step 1:

Install shell’s rpm, deb etc. package into operating system.

Step 2:

 Now try to access that shell or try to switch that shell if it is not working then run following steps.

Step 3:

Check configuration file /etc/shells and make entry for that shell like /bin/csh/ or /usr/bin/es or /usr/bin/rc or /bin/rbash etc. If entry is already present then don’t do anything.
But this step has to execute after installation only.

Step 4:

Run following command after making entry  in /etc/shells.

root@hello:~/home/test# add-shell shell-name


add-shell command is used to add shell in kernel. i.e. it updates the kernel information for this shell if it is not present in kernel’s database.

Advanced tricks of Sed command                                          Difference between SAN and NAS
Posted by Machindra Dharmadhikari On 7/31/2013 11:41:00 PM No comments READ FULL POST

Tuesday, July 30, 2013

Crontab in Linux                                                                            Steps to create Logical Volume

Vi editor works as text editor in Linux. We can create, modify, search and replace patterns in a file like these multiple operations, we can do using vi editor. Vi and vim editors are almost same commands but vim is having many advanced features as compared to vi editor. Vim is advanced version of vi editor.

Mostly vi search operation is very useful for us to while editing any file or changing any configuration file. Below are some of the examples of vi/vim editor commands:

Shortcut
Command
Vi filename
Open a file called filename/ we can use absolute path of file here
Esc + i
Insert mode
Esc + :wq
Save and quit
Esc + :q
Quit without save
Esc + :w
Save
Esc + /pattern
It will search pattern in a file and highlight that pattern if found
Esc + dw
Current word delete where cursor points
Esc + dd
Delete current line/ Cuts the current Line
Esc + x
Delete current character
Esc  + P
Paste whatever copied or cut before cursor
Esc + yy
Copy current Line
Esc  + 2yy
Copy current Line and one more immediate line of it
Esc + y$
Copy current line to end of file
Esc + p
Paste after cursor
Esc + q!
Quit and throw away any changes
Esc + ?Pattern
Search backward pattern in Vi editor
Esc + a
Append after cursor
Esc + I
Insert at beginning of Line
Esc + w
Jump word by word/ cursor always remain at beginning of word
Esc + W
Jump word by word
Esc + h
Move left
Esc + j
Move down
Esc + e
Jump to end of words
Esc + b
Jump to backward by words
Esc + B
Jump to backward by words
Esc + 0
Start of Line
Esc + _
Go to the start of Line
Esc  + $
Go to the end of Line
Esc + cc
Change of line
Esc + cw
Change current word
Esc + u
Undo current change
Esc + U
Undo current changes made to the current Line only
Esc + .
Repeat last command in vi editor
Esc + :e filename
Edit a file in a new buffer
Ctrl +ws
Split Windows
Ctrl + wv
Split Windows vertically
Ctrl + ww
Split Windows in Vi editor
Ctrl + wq
Quit windows
Esc + :bn
Go to next buffer
Esc  + :s/Pattern1/Pattern2/g
Replace all pattern1 with pattern2 in vi editor

                

How to recover deleted files in Linux                                                     Shells in Unix/Linux
Posted by Machindra Dharmadhikari On 7/30/2013 10:53:00 AM 2 comments READ FULL POST

Monday, July 29, 2013

Check CPU usage in Linux                                           Interview Questions for Linux Administrator

There are many commands which needed to know beginner of Unix OS. But it is not possible to understand all commands in one day. If you really new to Linux then please go through this article and understand the most used commands in Linux.

If you are new to Linux then, you will need to know, how to create directory, how to create file, how to read file, open file and edit it, copy file, move file, delete file and directories etc. let’s see how  we are going to do this operations by commands with examples:

mkdir Command


1.  Once you logged on to machine and opened terminal then first of all you need to create directory for your work. Create directory by following command:
login as: root
root@192.168.136.132's password:
[root@localhost ~]#
[root@localhost ~]# mkdir test
[root@localhost ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  test
[root@localhost ~]#

cd command

2. Once you create directory then you have to go inside the directory for this purpose, you can do it as follows:
  [root@localhost ~]#
[root@localhost ~]# cd test
[root@localhost test]#

touch command

3. Once you go inside the directory then we need to create a file. It is as :

[root@localhost test]#
[root@localhost test]# touch test.txt
[root@localhost test]# ls
test.txt
[root@localhost test]#

Vi editor

4. There are different ways of creation of files and generally touch, vi, cat or redirection output used to create a files. We will use vi to create one more file. But we can edit above created file by this way as well. Vi editor creates file if it is not present and if it is present then vi editor edits that file. If you want to know more about VI editor then please click here : VI editor in Linux

[root@localhost test]#
[root@localhost test]# vi test1.txt
[root@localhost test]#

cat command

5.  Once you edit that file and want to read it then use following command.
[root@localhost test]#
[root@localhost test]# cat test1.txt
Hello Linux Concepts and Commands Author
How are you?


[root@localhost test]#

more command

6. Sometimes, file will be very big and you can’t see it on one single screen output then you can read that file as follows:
More command reads file page by page. You just need to press Enter key for next page and backward page press b.
[root@localhost test]#
[root@localhost test]# vi test2.txt
[root@localhost test]#
[root@localhost test]# cat test2.txt | more
[root@localhost test]#
##We can use more command like cat also
[root@localhost test]# more test2.txt

cp command 

7. Now copy the one file to other i.e. create one more copy of test2.txt file and give name to new file as : test2.txt_bak
[root@localhost test]#
[root@localhost test]# cp test2.txt test2.txt_bak
[root@localhost test]#
[root@localhost test]# ls
test1.txt  test2.txt  test2.txt_bak  test.txt
[root@localhost test]#

mv command

8. Now rename to existing file (test1.txt) to test3.txt.

[root@localhost test]# ls
test1.txt  test2.txt  test2.txt_bak  test.txt
[root@localhost test]#
[root@localhost test]# mv test1.txt test3.txt
[root@localhost test]# ls
test2.txt  test2.txt_bak  test3.txt  test.txt
[root@localhost test]#







 rm command, rmdir command

 9.  Now delete the file by rm command, delete directory by rmdir command and if you have many directories inside the one directory then remove that main directory as follows:


[root@localhost test]# ls
test2.txt  test2.txt_bak  test3.txt  test.txt
[root@localhost test]#
[root@localhost test]# rm test2.txt
rm: remove regular file `test2.txt'? y
[root@localhost test]# ls
test2.txt_bak  test3.txt  test.txt
[root@localhost test]# mkdir test1
[root@localhost test]# cd test1
[root@localhost test1]# touch file1
[root@localhost test1]# touch file2 file3
[root@localhost test1]# cd ..
[root@localhost test]# ls
test1  test2.txt_bak  test3.txt  test.txt
[root@localhost test]# rm -r test1/
rm: descend into directory `test1'? y
rm: remove regular empty file `test1/file3'? y
rm: remove regular empty file `test1/file2'? y
rm: remove regular empty file `test1/file1'? y
rm: remove directory `test1'? y
##If you want to delete without prompt then use following command.
[root@localhost test]# rm -rf test1
###Crearting a empty directory
[root@localhost test]# mkdir test1
##rmdir command removes only empty directory
[root@localhost test]# rmdir test1
[root@localhost test]#


How to Run Windows application on Linux                                 Jmap Command in Linux
Posted by Machindra Dharmadhikari On 7/29/2013 02:11:00 PM No comments READ FULL POST
  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

    Chitika Ads 2

    Histat

    About

    Enter your email address:

    Delivered by FeedBurner