Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Wednesday, 26 August 2015

How to delete a non-empty directory in Terminal?

rm -rf myfolder

It deletes all files and folders contained in the myfolder directory.

Add sudo at the beginning of the command :

In case user doesn't have the permission to delete the folder:

sudo rm -rf myfolder

Otherwise, without sudo you will be returned permission denied. And it's a good practice to try not to use -f while deleting a directory:

sudo rm -r myfolder

Note: this is assuming you are already on the same level of the folder you want to delete in terminal, if not:

sudo rm -r /path/to/myfolder
FYI: you can use letters -f, -r, -v:

-f = to ignore non-existent files, never prompt
-r = to remove directories and their contents recursively
-v = to explain what is being done

Tuesday, 7 April 2015

Linux Tutorial for Beginners



Importance command for Java developer

Basic commands
How to create file.
How to create folder.
how to change permissions.
how to use vi editor.
grep commands.
how to install java on ubuntu using command
command for tomcat
sudo command
pipelines
filter
wildcards.

 Software Instalation

Adobe reader
Mysql
ellipse

Thursday, 2 April 2015

Basic Unix Commands For Java Developers

1. cd

       cd Directory name

 2. cd ..
 
     go to just one level above parent folder

3.

rm -rf repository/

remove repository folder and subfolder also

4. ps -ef

 show running processes.

5. ps -ef| grep tomcat7

show  tomcat7 's all processes.

6.  ifconfig

 show ip address in ubuntu

7. sudo service tomcat7 status

show tomcat running status

8.

sudo service tomcat7 stop

 stop tomcat7 if it is running state.

9.
sudo kill -9 PID

kill any processe.

10  ls -al 

show all file and folder in working directory.

11 pwd 

12. history

Show terminal history

13. unzip abc.zip

   extract the zip file

14.   tar -zxvf ellipse9.2.2.tar.gz

extract the tar file

15.  mysql -uroot -proot

For use mysql

16.   mysqldump -u root -p database_name > dump_file_name.sql

Create file name