Monday, May 23, 2011

What are File Permissions?



  • You can use letters to specify the permissions, with one or more of:
    • u=User (the file owner)
    • g=Group (other users in the file's group)
    • o=Other (everyone else)
    and one or more of:
    • r=Read permission
    • w=Write permission
    • x=Execute (or enter directory) permission
    • (and some more obscure ones, see the manual page)
    For example:

    chmod u-w file...
    Subtract user write permission from the file(s).
    chmod go+rx file...
    Add group-and-other read-and-execute permission for the file(s).






  • Or you can set permissions as an octal number. The permission bits have the meaning specified as in the description for umask below, except that a bit is set in order to give rather than deny permissions.For example, "chmod 640 file..." would set the file(s) to read and write (but not execute) permission for the user, read permission for group, and no permission for anyone else. This is represented as "rw-r-----" by the "ls -l" command.





Deleting Files and Directories in UNIX


rm Command is for REMOVING in UNIX 

rm file...

delete the specified files

rm -i file...

ask for confirmation before deletion

rm -f file...

don't ask for confirmation before deletion. BE CAREFUL!

rm -r directory

Delete directory and everything in it. BE CAREFUL! To remove empty directories, see rmdir

rm -rf directory

Delete directory and everything in it, without asking for confirmation. BE VERY CAREFUL!

Listing Files In a Directory


ls
list the files in the current directory
ls *.c
list the files which end ".c"
ls mydir/
list the files in directory mydir
ls -a
list ALL files, even ones which begin with a dot, which are normally omitted
ls -s
list files, with their sizes
ls -l
list files, giving full details about each file
ls -al mydir/
list all files in directory mydir (including those beginning with a dot), giving full details about each file

Saturday, May 21, 2011

How to know the Disk Space Usage


How to know the Disk Space Usage?
Ans:-Use du command (Summarize disk usage of each FILE, recursively for
directories.) Good to use arguments du -hs
(-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)  
(-s, --summarize display only a total for each argument

What are all the types of files we have in Unix

Types Of Files 
Files come in eight flavors:
Normal files
Directories
Hard links
Symbolic links
Sockets
Named pipes
Character devices
Block devices
What is the advantage of HASH table?
Ans:-The major advantage of a hash table is its speed. Because the hash function is to take a range of key values and transform them into index values in such a way that the key values are distributed randomly across all the indices of a hash table
What would you use to view contents of a large error log file? 
Ans:- tail  -10 file_name   ( last 10 rows)

Friday, May 20, 2011


I have found the problem with pv and removed the same from operating system. How can i find that hard disk physically in server??
Ans:-
\"prtconf -v\" will show you most details about the hard disk (and other
components) than you usually need to know.


How to backup AIX server?
Ans:-
(1)For backup of rootvg, mksysb command can be used on command line or via smitty.
Advantage of mksysb is that it can create a \'bootable\' media of the backup of rootvg.
(2) For backup of filesystems, \'backup\' command can be used ( restore command to be used for restoration of the backup).
(3) The answer given regarding savevg ( and restvg ) is correct.

How  to   replace the disk in rootvg ?(vg is  mirrored and there are other hard disks available in that vg)?
Ans:-
# reducevg vgname pvname
# chpv -C pvname
# rmdev -dl pvname
#mirrorvg vgname newpvname
#bosboot -ad /dev/pvname
#bootlist -m normal pvname1 pvname2
#ipl_varyon -p
# lsvg -l vgname

How to share files between two servers?
Ans:-

1) vi /etc/exports
add ebtries like
/pathnametoshare *(ro,sync)
then save file.
2) exportsfs -a
3) verify by using
showmount -e servername

Hi

Hi all i am Nayab rasool shaik and purpose of this blog is to post Technical Issues i face at my work place.