Monthly Archives: December 2008

ODOC, $, # and —

In the ODOC, the commands starting with $ prompt does not need any special permission to run it. But the commands starting with # prompt needs the super user permission to run it. In all the examples, I used the “–” symbol to separate the command…

Advertisements
Tagged with: ,
Posted in Uncategorized

Endian Check using C

This small program will help to detect whether the CPU is Big or Little endian processor. [code] #include

Tagged with: ,
Posted in Uncategorized

Reading Single Char in Linux

[code] /* mygetchar.c Read a single char without pressing the 'Enter' */ #include

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – DF

df — Disk Free and usage report Summary: df shows the amount of disk space available on the file-system (FS) containing each file name argument. If no file name is given, then the usage info of all currently mounted FSs are shown. Examples: [code…

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – DATE

date – Print/Set the system data and time Summary: date will print the time information in different formats and user can also make a custom formats using the options. Example: [code] $ date -- Print the current date and time. $ date --rfc -- Prin...

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – ALIAS

alias – Create alias name for a command. Summary: ‘alias’ is Bash build-in command. This is very useful to create a simple alias for a complex/ long/frequent commands. Once alias created, you can use the alias to call the original command. This al…

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – FREE

free — Display the memory utilization info. Summary: Displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel. Examples: [code] $ free -- Display the mem info...

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – WATCH

watch – Periodically run and show the output of a Program Summary: Watch runs the specified command(s) repeatedly, displaying its output. This allows us to monitor the output changes over time. Press Ctrl+C to stop the Watch Command. Examples :- […

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – NL

nl – Number lines of files Summary: Write each FILE to stdout, with line numbers added. With No FILE or -, read from stdin. Examples: [code] $ nl myfile -- Writes all non-empty lines with number. $ nl -ba myfile -- Number all lines. $ nl -ba -l2 m...

Tagged with: ,
Posted in Uncategorized

GNU/Linux Command – LS

ls — List directory contents Summary: List the current or specified directory contents and informations. It is similar to DOS DIR command. ls has option (-F) to show the different types of files with symbol ( / – Directory, * – Executable, @ – Li…

Tagged with: ,
Posted in Uncategorized