Monday, 21 November 2011

Terminal Guessing file name and locate file.

for guessing name,we usually use for copy,delete,and remove command. This only works if you want to delete multiple file that is same format in the same time also used for multiple file have similar but not same name. As an example i have five file and i want to delete it at the same time.

file1.txt file2.txt file3.txt file4.txt file5.txt
if i want to delete all of them on the same time,i just type this command.
"rm *.txt" or "rm ~/(directory)/*.txt"

or else i just type like this.
"rm file*" or "rm /[directory]/file*".i called it as guessing because the star will represent the character that is not same with the hint.


Next.i will share to you all how to locate file.First run "sudo updatedb" on terminal.wait a little bit(depends on laptop speed).once it finished,nothing will pop out.now run this command."locate [anything you want to find inside your laptop]".the result is the terminal will show all directory of the file that is relevant with your search.here the example.I finding mozilla as an example.



No comments:

Post a Comment