Saturday, December 21, 2019

Basic Unix commands of Frequent use


Following are some commands which you will use very often->

Suppose you are not able to deploy your ear successfully ,or your application is running very slowly; then most definitely you are short on space.

1) Use the following 2 commands to see the available space and memory->
$ df -h (Space)
$ free -m (Memory)

2) Check "class file" exists in which jar file.
$ find -name "*.jar" | xargs grep CitiNotesDataUtility.class

3) Find all instances of the specified process currently running.
$ ps -ef | grep processName
$ ps -ef | grep processName | grep java (java processes)

4) Kill Process : kill
$ kill -9 processId

5) List Directory Contents : ls
$ ls -a

6) Display Manual pages : man <command>
Linux has as extensive set of online documentation. They are referred to as manual pages.
$ man ls

7) Concatenate files: cat
$ cat file1 file2 > newFile

8) Current working directory
$ pwd

9) List all the current running processes
$ ps

10) Change Directory
$ cd /usr/bin
$ cd.. (go back)

11) Make Directory : mkdir
$ mkdir newDirName

12) Remove files and directories: rm
$ rm file.txt

$ rm dirName


No comments:

Post a Comment

Home