Hla Hla Htay’s Notes


list all files including subdirectories
November 19, 2008, 6:51 am
Filed under: LINUX command | Tags: , , ,

You will need read permission on all of the directories so you may need to do this as root.

find . -print

ls -lR

http://www.unix.com/unix-dummies-questions-answers/22800-command-list-all-files.html



Linux : Removing Temp files
August 27, 2008, 10:36 am
Filed under: LINUX command | Tags: , , , ,

Today, I make a tar.gz zip files in Linux (Fedora Core 8). The folder size is more than 20GB. It stopped in the middle and took more than 10 mins. So I cancel zipping. My space is stolen and I didn’t see that temp file. I search in the web how to delete those temp files. One suggested Yam clean all. But it didn’t work. So, I search with findcommand. You can use locate command too. Use locate fr-. It will show all those temp files. I think locate fr-will work for fedora only.

find -name ‘*’ -size +10000k Then I found out those hidden tmp files like this ./.fr-JAIG1u/*.tar. When I see with ls -s ./.fr-JAIG1u-*.tar. This show 2245400 ./.fr-JAIG1u/*.tar. I copy and has to remove with rm. If anyone has better software or better way to handle those hidden temp files, I request please leave the comment. Thanks.



Linux : Declaring environment variable
June 11, 2008, 4:36 pm
Filed under: LINUX command | Tags: ,

You know the proverb ‘A picture worths thousand words’. I am lazy bone and sometimes, I want to see “how to do process” very clearly in this way. :D Just see what I have uploaded. I am using WordNet and Weka in my research. I will write about later.

  • VariableName=location of YOUR PROGRAM
  • export VariableName

You have to declare in the file “bashrc” . Below is how to do

  • type “vi .bashrc”
  • press “ESC”
  • press “I” (only when you press “I”, you can type something).
  • declare the location of the file as described in the picture.
  • after that , press “ESC”, shift + ; + q ( quit without saving)
  • press “ESC”, shift + ; + wq ( save and quit)



For file size larger than 2GB
May 19, 2008, 1:07 pm
Filed under: LINUX command | Tags: ,

For Linux like system, I recommend k3b for burning CD and DVD. In Linux, file chunk size is limited to 2GB. If you wish to burn or write larger than 2GB, the error message is shown to give unlimited to memory.

After searching through internet..
I got those commands & share you.

  • log on with root.
  • root$ ulimit -d unlimited #for data size
  • root$ ulimit -v unlimited #for virtual memory
  • root$ ulimit -l unlimited



Find
May 16, 2008, 6:56 am
Filed under: LINUX command | Tags:

  • find  path(Directory you want to search) -name *.txt | xargs rm
  • Eg. find /home/Experiment/ -name  *.txt | xargs rm
  • It is pipeline processing. First , find all the files end with “txt” and second remove those files
  • Eg. find /home/Experiment/ -not -name  *.txt | xargs rm
  • First , find all the files which does not end with “txt” and second remove those files