How to compress files in UNIX and the commands used ?
Compress or expand files.
Syntax
gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
zcat [ -fhLV ] [ name ... ]
Example:
gzip myfile
or using
compress [-c] [-f] [-v] filenames
Example: compress -v bigfile.exe
By using tar, compress, zip
Explain any precautions needs to be take before you do soft mount
ln -s
When we give boot cdrom -s which cd should be there inside cdrom ?
For Booting cd in CD Rom the command is :
mount cd-rom/mount
A bootinfotable cd should be inside the cdrom when we give boot cdrom -s.
In UNIX what is the purpose to use echo with the option "-e"?? i.E echo -e
-e option tells echo to consider the escape sequences in the statement.
e.g. echo "Without hyphen e option
It will be the same"
Output :: Without hyphen e option
It will be the same
echo -e "With hyphen e option
It will be different"
Output :: With hyphen e option
It will be different
How to grep directories has reached above 80% from the df output using basin grep command.Below are the steps I have used df -h > date.Ksh grep "%" date.Ksh >space.Ksh cut -c 40-44,45-80 space.Ksh > %.Ksh grep "[80-10][0]%" %.Ksh see the output after above cmd $ grep "[80-10][0]%" %.Ksh 100% /opt/tivoli/tsm ...
$ df -k|grep "1[0-9]%"
O/p:
2031440 342300 1584284 18% /
3047184 392216 2497684 14% /opt
190403 31064 149509 18% /osmf/mgmt/scheduler
3047184 391464 2498436 14% /var
/dev/cciss/c0d0p1 101086 15970 79897 17% /boot
#!/bin/ksh +x
df -kl|grep "<8[0-9]%>" > dfout.log
df -kl|grep "<9[0-9]%>" >> dfout.log
df -kl|grep "100%" >> dfout.log
How can you come to the home directory?
Cd $home
These are following ways to jump to the Home directory
1. cd
2. cd ~
3. cd ~
4. cd ${HOME}
This is a vague question, so I'll provide multiple answers.1. Home differs on various flavors of UNIX, but standard for most is: /home. To change directory to the Home directory, you would i...
How to change ownership to a file or folder ?
Chown ownername file r directory name
use ::: chown command
How to find cpu utilization for only server ?
TOP command and prstat -a
By using "TOP"command we can see the CPU utilization. also u can ping the "sar" command
What is the output of kill -3 pid ?
kill -3 pid find the thread dump jvm process
Kill -3 pid is used to create thread dump for the process id. This is basically used for troubleshooting and to understand what went wrong with the above process. Suppose some node of weblogic is not ...
What are the parameters in http.Conf file ?
Some parameters are
1.mod_rewrite
2.WLLogFile
3.DebugConfigInfo
4.StatPath
5.CookieName
6.MaxPostSize
7.FileCaching
What is vlan in vio server in aix ? What is its main purpose ?
VLAN stands for virtual LAN,it is a broadcast domain created by switches.With VLANs, a switch can create the broadcast domain.The purpose of VLANS is to improve network performance by separating large broadcast domains into smaller ones.
Print using string copy and concate commands
How will you print tata alone from tata power using string copy and concate commands in c?
include
#include
#include
int main()
{
char myString[] = "TATA POWER";
char output[10];
strcpy(output,myString);
output[4] = ;
printf("OUTPUT :%s
", output);
printf("ORGINAL STRING :%s", myString);
getch();
}
What is the number of the masked code ee@?
022 is the number of the masked code ee@
If a file has permissions 000, then who can access the file?
If all you want to do is get rid of that file, as I did, just save a known file, like a dummy text file, with that same name and overwrite the existing file. I replaced my errant directory file with a...
When a file or directory is created the default permisions inherited .they arefor files :666for dir: 777Actually it is not the file permission .the "umask" value is subtracted from these def...
What is the number of masked code ee@?
When kill -3 command is executed, it will quit from executing the process and additionally it will dump core for that process mentioned with pid.
022 is the number of mask code ee@.
Assume that you are not currently in your home directory. Enter a command to copy all files in your home directory beginning with the letter 'a' to the current directory.
cp [a]* /export/home/
cp ~/a* .
Construct pipes to execute the following jobs?
1. Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list.2. Output of ls should be displayed on the screen and from this output the lines containing the word ‘poem’ should be counted and the count should be stored in...
who;echo "Total number of users: "`who|wc -l`
Ans for question 1
echo `who`\n the number of users logged in is `who | wc -l`
Command to find the ip of an proxy server in UNIX
echo $http_proxy
ifconfig
Kernel - The kernel is the main component of most computer operating systems. - It is a bridge between applications and the actual data processing done at the hardware level - The kernel is the heart ...
Unix was developed using ‘C’ Language. Unix was the foundation on which Linux was built. Unix has Character based environment while Linux has Graphical as well as Character based environment. Unix has...
At a fixed location on the system disk
2.at a fixed location on the disk