Tag: command

  • Sessions of bash builtin command named “times”

    ABOUT times Print the accumulated user and system times for the shell and for processes run from the shell [bash] $times 0m0.063s 0m0.024s 0m0.008s 0m0.012s $times pin 0m0.064s 0m0.025s 0m0.008s 0m0.012s $times ping 0m0.065s 0m0.025s 0m0.008s 0m0.012s $times –help times: times Display process times. Prints the accumulated user and system times for the shell and […]

  • About bash builtin command named “eval”

    ABOUT eval eval is a builtin command of the Bash shell. It concatenates its arguments into a single string, joining the arguments with spaces, then executes that string as a bash command. It’s similar to running bash -c “string”, but eval executes the command in the current shell environment rather than creating a child shell […]

  • Tinkering with trap and exit commands

    TYPICAL COMMANDLINE SESSION [bash] $echo $? 0 $echo $? 0 $exit 10 | tee solve.txt $cat solve.txt $rm solve.txt $exit 10 | echo $? 0 $exit -1 | echo $? 0 $exit -1 | echo $? 0 $false | true $echo $? 0 $false $echo $? 1 $true $echo $? 0 $exit 5 | tee […]

  • Bash Shell command : file

    this tutorial content may not be accurate

  • file — determine file type

    commandline session $ls faq favicon.ico index.html kernel.css mirrors pub robots.txt $file kernel.css kernel.css: ASCII text $file -l | head Set 0: Binary patterns: Text patterns: Set 1: Binary patterns: Text patterns: Set 0: Binary patterns: Strength = 340 : sc68 Atari ST music [] Strength = 340 : T64 tape Image [] $file -l | […]

  • hello.pl —x Prints the message using two different delimeters.

    A UNIX Command $cat hello.pl # Prints the message using two different delimeters. print “Hello, world!\n”; print qq=Did you say “Hello?”\n=; $perl hello.pl Hello, world! Did you say “Hello?” $ UNIX Explanation “print” is categorized under Input/Output Functions. Prints the message using two different delimeters. source : http://sandbox.mc.edu/~bennet/perl/leccode/index.html

  • truncate – shrink or extend the size of a file to the specified size

    A UNIX Command $cat example.text hello $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 6 Jun 21 02:32 example.text $truncate -s 10 example.text $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 10 Jun 21 02:35 example.text $hexdump example.text 0000000 6568 6c6c 0a6f 0000 0000 000000a $cat example.text hello $truncate -s 9 example.text $ls -l example.text -rw-r–r– 1 […]

  • find command part 1

    $cat 1 $ $cat 2 $ $find . ./2 ./1 $find . . ./2 ./1 $ls 1 2 $find . -print . ./2 ./1 $find -print . ./2 ./1 $find -name 1 ./1 $ The find command is used to locate files on a Unix or Linux system. find will search any set of director- […]

  • mysql start

    MySQL tinkering mysql> create database jeffdatabase -> ; Query OK, 1 row affected (0.03 sec) mysql> show databases; +——————–+ | Database | +——————–+ | information_schema | | jeffdatabase | | mysql | +——————–+ 3 rows in set (0.00 sec) mysql> use jeffdatabase Database changed mysql> show tables; Empty set (0.00 sec) mysql> create table songs […]

  • addition. using PHP

    addition #!/usr/bin/php # Author : Jeffrin # jeffrin@rocketmail.com # License GNU GPL V3 # usage : php addition.php <?php $f=’1′; $s=’1′; echo $f + $s ; echo “\n”; ?> A Screenshot $./addition.php # Author : Jeffrin # jeffrin@rocketmail.com # License GNU GPL V3 # usage : php addition.php 2 $