Tips For Linux

Telugu SystemWithoutTelugu

There are a number of ways to have a better performance from Linux (or FreeBSD) using these commands/procedures:

1. Use of braces "{ }". Creating multiple directories: Use "{..}" with mkdir command. This command "mkdir {ab,cd,ef,gh,if}" will create ab,cd,ef, gh,ij directories in one step. The command "rmdir {..}","chmod {....}" will be similar- all the directories within the braces will be covered. Commands - mv, touch - are also effective with this command.

1b. The command "mkdir -p" will create directories recrusively as told. "mkdir -p a b/c d/e/f g/h/i/h" will create directories in the same way - with subdirectories.

2. a. Copying one file to several directories in one step: These commands will work effectively:

echo dir1 dir2 dir3 | xargs -n 1 cp file1 or

cat inputfile | tee outfile1 outfile2 outfile3

2. b. Copying Several Files to One Directory: These two commands will work:

"cp {*.txt,*.html,*.pdf,*png} /xyz/." where xyz is name of destination directory.

"mv {*.txt,*.html,*.pdf,*png} /xyz/." where xyz is name of destination directory.

Please note the dot after the directory in these two examples. This dot is essential and the command will not give desired result without it.

2. c. Making very long files with one/two/three column more compact: Use the syntax "paste -d " " - - < inputfile > outputfile". Here two consequitive lines will be merged. The syntax "paste -d " " - - -< inputfile > outputfile " will merge three consequitive lines. "-" represent the number of lines to be merged.Example: Original file has 1062 lines while the file modified with paste command has 324 lines. Here four lines have been merged- so it is almost one-fourth of the original. Further improvements in the merged file: 1. Columns in original file had borders "<table border="1">", in modified file borders of columns are removed with "<table border="0">" syntax. 2. Hyperlink and name of kirtana are merged in the modified file to have space.

3. Linux commands can be given as a group, one after other- separated by ";". The user need not wait till the result of one process is out to type subsequent commands.

4. The speed and security can be improved by starting and running only urgently needed applications. Other applications can be started when they are required. This will minimise the load on the CPU.

5. Use the packages rsync or dump and take regular backups on external media. Regular backups will reduce chance of loss of data due to mishaps. Even if the system is down, it can be quickly restored. There are packages for load- sharing if you have more than one system. There are packages for RAID, LTSP, High Availability Cluster, Parallel Computing. These ensure that (1) mishaps do not bring down the system for long, (2) that heavy workload does not dislocate/slow down the system. Use them fully. The concerned websites have full documentation to deal with almost all contingencies.

6. Use effectively all available systems like tripwire, rootkit hunter, log sentry, squid to streamlike and audit the working of the system regularly.

7. There are long established applications like sed, awk, latex which do offer almost unlimited scope for speeding up work. The administrator must make all users aware of their availability.

8. Select a package which is comparatively lighter or smaller. For example- Abiword and gnumeric are for all practical purposes same as Open Office/Libre Office , but smaller and lighter- GIMP, MariaDB [or MySQL], Image Magick which come with the distros can fill up most of your needs.

9. Improving appearance of xhtml/html page by removing underlines in hyperlinks: Add "a {text-decoration: none; }" in css part of the xhtml file. Compare the two versions of this tips.html file- one with underlined hyperlinks, and the other one without underlining of the hyperlinks.

10. Joining image files simply: For simple concatenation in a single row or column, the append option of the convert tool is sufficient.

a. Vertically:- One below another: "convert x.png y.png z.png -append xyz.png" "-append" combines all images vertically. Example: ap-tse AP- with english headings and ap-tste AP- with telugu headings are merged into a vertically combined file- one below another - top to bottom.

b.Horizontally: "convert x.png y.png z.png +append xyz.png" "+append" combines horizontally, joining one image after another. Example: ap-tse AP- with english headings and ap-tste AP- with telugu headings are merged into a horizontally combined single file- merged one after another left to right.

These tips are applicable for FreeBSD and all distributions of linux.

Valid XHTML 1.0 Transitional

Valid CSS!