#1 How to clear the cache memory in Linux

In Linux, you can clear the cache of the memory by running following command:
sync; echo 3 > /proc/sys/vm/drop_caches
sync =Flushes the file system buffers
By the way, you can get to know the memory usage of cache memory and swap area by running the following command:
free -m
-m = lists the size in Mega Bytes.

#2 Shortcut to clear memory in Windows OS

Running multiple applications simultaneously for long periods leads to a gradual decrease in system performance over time. Often the only option is a restart. Even if you close the application in the Task Manager, the tasks/threads associated with the application are not released completely, depleting the system?s memory resources making the system unstable and sluggish. [...]

#3 UNIX/Linux: Command to search and replace the string in multiple files

If you want to search and replace a string in multiple files, you can make use of either of the following commands. First one uses combination of ‘find’ and ’sed’ command. Second one uses combination of ‘find’ and ‘xargs’ commands.
Coomand 1:
find -type f -name ‘File_Name’ -exec sed -i ’s/Old_String/New_String/gi’ {} \;
Command 2:
find [...]

  « Older Reviews