Monday, November 10, 2014

Ten linux unix os commands you should know

Ten linux/unix os commands you should know

1- ls
list the files

2- cat
display a file and join more than two files

e.g
cat <file-name.txt>

cat <file1.txt> <file2.txt> ...

3- mkdir
create a diectory
e.g.
mkdir dir-name

4- cp
copy file from existing file to new one

e.g.
cp file1.txt file2.txt

5- mv
move a file name to another
e.g.
mv file1.txt file3.txt

6- uname
To check linux/unix OS and architecture(32/64 bit)

7- cut
To cut specified field/column from a file
e.g.
cut -f 2 file.txt

8- paste
Join two files content into one file
e.g
paste file1.txt file2.txt

9- grep
 Search a string in a file

grep "maria" file1.txt

10- find

find the file in specified location
e.g.
find /home/expert file1.txt



Tuesday, May 13, 2014

How invoke POST HTTP request through firefox RESTClient plugin?

How invoke POST HTTP request through firefox REST Client plugin ?

You have to set the “request header” section of the Firefox plugin to have a “name” = “Content-Type” and “value” = “application/x-www-form-urlencoded”. Then you were able to put something like “name=rashid” in the “request body” and the server found a post variable with called “name” with the value you set.

At the top go to
Headers->Custom Header
then
In place of Name field without quotes:
"Content-Type"
In place of Value field without quotes:
"application/x-www-form-urlencoded"