ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Operating-Systems >> Unix
 
  Unix-Commands (151)  Unix-Threads (10)  Unix-IPC (27)  Unix-Socket-Programming (2)  Unix-System-Calls (4)
  Unix-AllOther (93)
 


 

Back to Questions Page
 
Question
what will be the output of ls ~/..
Rank Answer Posted By  
 Question Submitted By :: Rukhsar
This Interview Question Asked @   ABC
I also faced this Question!!   © ALL Interview .com
Answer
It will list the contents of /
 
0
Deepu Kalavampara
 
 
Answer
it will list the contents of home directory
 
2
Munni155
 
 
Answer
It will show the content of the /home directory
 
0
Dinesh
 
 
 
Answer
it will show the list of files&directories (say contents) in
the current directory which u r working....
 
4
Guptamurali
 
 
Answer
it will shows all users in serversystem
 
0
Naveen
 
 
Answer
It will show the shell as well as the the path from home
directory to the current directory.
eg: say we are in diretory swaroopa and swaroopa is there in
the home directory here is the o/p
bash: /home/swaroopa/..: is a directory

Swaroopa kalgi
 
0
Swaroopa
 
 
Answer
It will list the files and directories of the current user 
parent's login directory

i.e. 
If the current user smith login directory is "/home/smith",
then the parent's login directory is "/home"

In this example, the files and directories in "/home" are 
listed.
 
0
Phil
 
 
Answer
It will list the files and directories of the current user 
parent's login directory

i.e. 
If the current user smith login directory is "/home/smith",
then the parent's login directory is "/home"

In this example, the files and directories in "/home" are 
listed.
 
0
Phil
 
 
Answer
It prints the directories and file which is in your parent 
directory.
If u are logged in root ..it will show contents of / 
directory. 

If u are logged in /home/sandesh ....it will show contents 
of /home directory . 

~/ means the user login directory.
 
0
Sandesh
 
 
Answer
it display the home directory content.
 
0
Sugumar
 
 
Answer
It will simple list of files and dir.s ( contents ) of the
Root directory i.e., / .
 
0
Ravikiran
 
 
Answer
it will display all the files and directories in the parent 
of the current directory.
 
0
Nagarjuna
 
 
Answer
it will list all the contents of the root directory.
doesn't matter in which section of the file or directory 
you are working in whenever you will give this command it 
will always list the contents of the root directory.
 
0
Varun
 
 
Question
what will this do $cat > file.c  ?(file.c is a file in
current directory)
Rank Answer Posted By  
 Question Submitted By :: Chandrasekhar Kar
This Interview Question Asked @   IBM
I also faced this Question!!   © ALL Interview .com
Answer
It will allow you to create file.c ( if file.c is 
available, it will be overwritten with new data )
 
0
Ram
 
 
Answer
it will show an error becuse here $cat will not work like
narmal cat command.$cat is not a command it is a variable
which should be defined prevously according to that the o/p
will depend.
 
0
Visu_kvg
 
 
Answer
the cat command is used to create and append info to the 
files. by using the cat>file.c we create the file file.c.
if it is already in the current directory then it erise the 
old info and place the new info onto the file file.c.
 
0
Nagarjuna@rvr
 
 
Answer
display the content of the file
 
0
Guest
 
 
Question
how unix kernel distinguishes between a normal file and
device file ?
Rank Answer Posted By  
 Question Submitted By :: Chandrasekhar Kar
This Interview Question Asked @   IBM
I also faced this Question!!   © ALL Interview .com
Answer
This information (file type) is stored in the inode of a 
file, as one of the fields.
 
0
Asif
 
 
Answer
while listing the file names by ls-l command we get hyphen 
is the first character that shows it is a normal file and
if we d instead of hyphen(-) that is device file
 
0
Guest
 
 
Answer
Guest,

You are right about the 'ls' command, but 'ls' is a user 
level command, which invokes (among others) read system 
call to read and display directory contents (file/ dir 
names in a directory). Ultimately kernel parses inode of 
each file to get its type.

Rgds,
asif
 
0
Asif
 
 
Answer
Based on inode table.
 
2
Guest
 
 
Question
HOW DO CREATE A NFS FILE SYSTEM
Rank Answer Posted By  
 Question Submitted By :: Saroj
This Interview Question Asked @   Mind-Tree
I also faced this Question!!   © ALL Interview .com
Answer
Among the many different file systems that FreeBSD supports 
is the Network File System, also known as NFS. NFS allows a 
system to share directories and files with others over a 
network. By using NFS, users and programs can access files 
on remote systems almost as if they were local files.

Some of the most notable benefits that NFS can provide are:

Local workstations use less disk space because commonly 
used data can be stored on a single machine and still 
remain accessible to others over the network.

There is no need for users to have separate home 
directories on every network machine. Home directories 
could be set up on the NFS server and made available 
throughout the network.

Storage devices such as floppy disks, CDROM drives, and 
Zip® drives can be used by other machines on the network. 
This may reduce the number of removable media drives 
throughout the network.
 
0
Sushil
 
 
Question
What is the difference between Shell Programming and Shell 
scripting?
Rank Answer Posted By  
 Question Submitted By :: Polam.jeevan
This Interview Question Asked @   Wipro
I also faced this Question!!   © ALL Interview .com
Answer
I think both are same concept.
 
0
P
 
 
Answer
Shell programming is wrong terminology. Its shell scripting.

There is difference between scripting and programming. Unix 
is shell scripting.
 
0
Sailesh K
 
 
Answer
The term "Shell programming" is not true. "Shell scripting"
is the term which is a collection of command to do a
specific task. The "shell" act as a "Interpreter". When we
execute a shell script, a temporary shell is created and the
interpreter interprete and execute one line at a time. if
any error in the line then it exit from that line. No next
line will be read.

Getting error and jump to next line is happen in case of
"Compiler".
 
0
Dhirendra Rai
 
 
Answer
shell script is only using the multiple commands in one 
sctipt.  But shell programing is we are using commands and 
logic in one script.  Otherwise there is no any difference 
in between.  It is just for our identification alone.  

Exameple:-  C or C++ in these languages we can use only 
logic  But we can't not use commands.
 
0
C Sivakumar
 
 
Question
Give the command to display space usage on the UNIX file system.
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
du
its used 2 check d space used in bytes...

df command is used 2 check d free space available in ur file
system in Blocks
 
0
Sasmita
 
 
Answer
df -k .
 
0
Mahesh
 
 
Answer
using du or ds... i am not sure but one of the commands is
definatly correct.......
 
0
Suresh
 
 
Answer
du---is the command which is used for checking the disk 
usage in unix.
 
0
Satya
 
 
Answer
df -mk or df -h will do

d stands for disk
f stands for free
 
0
Chitra
 
 
Answer
1. df -k
2. df -h
3. du -sk [Directory name]
4. du -sh [Directory name]
 
0
Rohan Satpute
 
 
Question
How can u doing testing in  Unix environment ?
Rank Answer Posted By  
 Question Submitted By :: Praveenkanties
I also faced this Question!!   © ALL Interview .com
Answer
By creating the log file
 
0
Biswarup
 
 
Answer
Using echo statements and logs
 
0
Sailesh K
[Wipro]
 
 
Question
What is the difference between windows environment and Unix 
environment ?
Rank Answer Posted By  
 Question Submitted By :: Praveenkanties
I also faced this Question!!   © ALL Interview .com
Answer
Windows Environment:
Windows environment is a GUI(Graphical User Interface mode) 
based where you can perform the operation by clicking on 
the options in the menus, clicking on the icons available 
in the environment. A lay man can perform the operations in 
windows.

Unix Environment:
Unix environment is a Command based mode. Here for every 
action you need to type the command. So, you need to know 
the commands to work on it.
 
0
Indhumathi
 
 
Answer
Windows OS : Message Oriented (GUI Supported), Preemptive, 
multitasking operating system from Microsoft announced in
1983 released in 1985.

Unix: State oriented, Preemptive "Multiuser" and
"Multitasking " OS from Berkeley
 
0
Nirmalraj
[Wipro]
 
 
Answer
windows: windows is a GUI based operting system.
         "multi tasking".


unix  : unix is command based operating system.
        "multi tasking " and "multi user".
         more secured.
 
0
Anuradha Bhagavathula
[Wipro]
 
 
Answer
WINDOWS operating system is a GUI based operating 
system.Everything we can do by means of clicking on the 
ICONS.Apart from all these it a multi tasking os

UNIX operating system is command based os where commands 
along with their different options are used to perform 
different jobs.Its a multi user,multitasking and multilayer 
operating system...
 
0
Puspaketu
[Wipro]
 
 
Answer
Windows :: In windows there is single Virtual memory, And 
all the process runs under that memory.

Unix :: In Unix every processe have it's own memory to run 
under that.
 
0
Devil
[Wipro]
 
 
Question
What is use of sed command?
Rank Answer Posted By  
 Question Submitted By :: Vandanaverma_2
This Interview Question Asked @   BitWise , Infy, Reliance
I also faced this Question!!   © ALL Interview .com
Answer
its same like Find and replace strings
 
0
Vijay
 
 
Answer
sed reads the standard input into the pattern space, 
performs a sequence of editing commands on the pattern 
space, then writes the pattern space to STDOUT. 
 
0
Vandanaverma_2
 
 
Answer
sed is a command used for opening stream editor.
 
0
Monu Verma
 
 
Answer
sed is a stream editor for editing files from a script or from 
the command line
 
0
Surya
 
 
Answer
sed -e 's/oldstuff/newstuff/g' inputFileName > 
outputFileName
 
0
Naren
 
 
Answer
sed is a multipurpose tool which combines the work of 
several filters.

sed uses instructions to act on text.
AN instruction combines an address for selecting lines with 
an action to be taken on then , as shown by the syntax
  
 sed options 'address action' file(s)
 
0
Sumitabha Das
 
 
Answer
sed reads the standard input into the pattern space, 
performs a sequence of editing commands on the pattern 
space, then writes the pattern space to STDOUT.
 
0
Kumar Akhila
 
 
Question
Which Command is Used for temprary switch User?
Rank Answer Posted By  
 Question Submitted By :: Vandanaverma_2
This Interview Question Asked @   BitWise , Ibm
I also faced this Question!!   © ALL Interview .com
Answer
Su
 
0
Vandanaverma_2
 
 
Answer
su--is the command to siwtch the user.
 
0
Satya
 
 
Answer
we can use su or sudo
 
0
Saravanan
 
 
Question
Which mode is used for allowing file write,read and append 
mode?
Rank Answer Posted By  
 Question Submitted By :: Vandanaverma_2
This Interview Question Asked @   BitWise , Tm
I also faced this Question!!   © ALL Interview .com
Answer
777
 
5
Raju
 
 
Answer
a+
 
0
Vandanaverma_2
 
 
Answer
chmod
 
0
Guest
 
 
Question
how to remotely move a file ??? that mean how to move a file
one machine to another machine ???
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Altair
I also faced this Question!!   © ALL Interview .com
Answer
rcp command
 
0
Monu Verma
 
 
Answer
By ftp
 
0
Biswarup
 
 
Answer
Using the scp command, which mean "source copy"

Syntax:
scp source destination

Example: 
Moving a file foo.txt from machine1 to machine2
scp foo.txt host@machine1:/
 
0
Ruchi Arora
 
 
Answer
[atdev]/abcd/data/atdev $ ftp 70.24.12.410
Connected to 10.24.124.43.
220 cbx82526 FTP server (Revision 1.1 Version wuftpd-2.6.1
(PHNE_34306) Mon Mar 13 11:14:17 GMT 2006) ready.
Name (70.24.12.410:attest): attest
331 Password required for attest.
Password:
230 User atdev3 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls -lrt
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
total 26560
-rwxr-x---   1 atdev3     geneva           0 May 15 15:12 
Lock
drwxrwxrwx   2 atdev3     geneva          96 May 15 15:12 
ftp>mv inputfilename outputfile
ftp> bye
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 3958 bytes in 1 
transfers.
221-Thank you for using the FTP service on cbh32526.
221 Goodbye.
 
0
Sailesh K
 
 
Question
what is the meaning of this command  rm -rf / 
what will it do ?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Altair
I also faced this Question!!   © ALL Interview .com
Answer
It will remove a directory including its subdirectories and
files
 
0
Monu Verma
 
 
Answer
recursively forcely delete the objects even the subfolders 
contains any files.
 
0
Sailesh K
 
 
Answer
this is used to delete the directoy even it is containing
files or sub folders.......
 
0
Bharath Kumar
 
 
Answer
rm -rf removes the directory recursively and also forcefully.
r stands for recursively
f stands for forcefully

The above command can also be used for removing a file.
 
0
Chitra
 
 
Question
what is mount ,tell me about mount ,how can u use in real
time project??
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Symphony
I also faced this Question!!   © ALL Interview .com
Answer
if you have 2 operating system on one HDD, mean linux and
windows now, if u wants to use the D:\ of windows then u can
use mount command.

after mounting D:\ u can directly put u r data from linux 

when u re-boot system and login to windows then u will be
able to use that data.
 
0
Chirag
 
 
Answer
mount is a command which is used to copy or to use the 
files or folders which are in windows into ur linux.

coomand:
mount /dev/hda5 /mnt/temp
 
0
Satya
 
 
Answer
The process of adding or linking or mapping the formatted
disk space to a folder is called mounting.
Like the boot partition is formatted in ext2/3 filesystem
and then it is mounted to /boot folder.You cannot use any
partition or disk without mounting
 
0
Visu_kvg
 
 
Answer
mount is used for mounting the devices and filesystem it is
a command utility for mounting devices
 
0
Saravanan
 
 
Answer
mount is nothing but a command which displays the already 
mounted file systems.
 
0
Varun
 
 
Answer
In computers, to mount is to make a group of files in a 
file system structure accessible to a user or user group. 
In some usages, it means to make a device physically 
accessible.

In a UNIX environment, the mount command attaches discs, or 
directories logically rather than physically. The Unix 
mount command makes a directory accessible by attaching a 
root directory of one file system to another directory, 
which makes all the file systems usable as if they were 
subdirectories of the file system they are attached to.

Unix recognizes devices by their location, as compared to 
Windows, which recognizes them by their names (C: drive, 
for example).


Command Usage example:
$ mount	/dev/hda1	/mnt/temp
 
3
Sreedhar
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com