using this command you can retrieve the information related to the Linux/Unix Kernel
pwdx pid:this command will give you the present working directory in which the process resides.
In case you want to kill or stop any running process then before killing the same note down the path using the pwdx pid, then you can start the process using the path returned by pwdx pid command.
whoami: this command will show you the logged in user.
ps -ef| grep processname
ps -ef | grep java for java processes
similarly for any running processes the grep can be used to identify the list of running processes.
ps -ef | grep processname
top command will list all the processes which are consuming high resources, using the id presented by top command you can stop
or manage the processes accordingly.
head -100 filename
tail -100 filename
rm -rf file
This is a very powerful command and can delete anything, so be careful and think twice before using this command.
mv file1 file2
ln -s /path/to/file linkname
kill -9 pid
If you are not able to kill the process using your id, then login as root and kill the process.
or next time start the process using your id.Check what is the permission for your user on that process.
Better to give chmod 775 or 755 processname.
this is also called daemon process which will keep on running even if you logout of the terminal.
tar -xvf archive.tar
tar cvf archive.tar.gz directory
grep i “text to be searched” -i is used for ignore case
grep -r “text” directory
find . -name filename(starting from . current location)
If you are stuck in any particular java related code problem then you can post us your problem at the link below and we will help you to resolve the same by providing the optimal solution.