Sunday, September 2, 2018

Unix commands - WebSphere Application Server Interview Questions - Part -14.1

DISK COMMANDS : 



1) du : Gives amount of disk space usage

Syntax : $ du [options] [directory or file]




2) $du –sh file/dir
      ----> Gives the size of the file/dir

3) df -kh : Gives Available space mounted on file system.

4) du -sm : Shows in no of blocks.




LS COMMANDS :

1) ls -al   :  To show all files in Current directory.

2) ls -ltr  :  List the files in directory with the Newest files last.

3) ls - l | grep "^d" : Only users created directories in your system.

4) ls -of -i  : 9080 To check the port

5) less  : To view tar files without untar.




COMPRESS COMMANDS : 

1) gzip  :  Used to compress the file.

2) gunzip : Decompress a file.




PROCESS COMMANDS :



1) ps -ef : All ports will be displayed.

2) ps -ef | grep java : Show all Java processes.

3) ps -ef | grep java | wc -l  : To show how many java processes are running on system.

4) ps -ef | grep java | wc -c  : Display one line Character Count.




SEARCH COMMANDS :



1) Find  : The find command is used to find the files in the hard drive.

Example: $ find *.pl



2) Locate  :  The locate command is much faster than the find command.

-----> Finding a file using locate is faster when compared to the find command


Example : $ locate



Q)   How to check a particular port is working or not in unix?



A)  netstat -a | grep 80




Q) What is the present LINUX VERSION  ?



A) VERSION 5.0


Q)  In ls -lrt, what t stands for and r stands for l stands for?



A)  -l shows you huge amounts of information (permissions, owners, size, and when last modified.)

     -r reverses the order of how the files are displayed.
     -t shows you the files in modification time


Q)  How to check WAS is running or not through PS?

A)  Ps -grep

Next Page : http://webspherelife.blogspot.com/2018/09/unix-commands-websphere-application_2.html

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Recover password from .sth file

Create perl file (unstash.pl) and run the script. #!/usr/bin/perl #usage perl unstash.pl use strict; die "Usage: $0 \...