count-files-and-directories-in-linux

Ten command line time-savers for Linux administrators

Quick command line navigation and execution is the key to easy Linux system administration. Learn these 10 command line tricks to increase your proficiency and speed in Bash or other Linux shells.count-files-and-directories-in-linux

Although the Linux desktop has been subject to enormous improvements over the past twenty years (with perhaps the most notable change coming by way of the Ubuntu Unity interface), the command line remains unparalleled in terms of the power it can offer an experienced system administrator. Although most of the following 10 tips focus on the Bash shell, all of these tips will be easily applicable to other modern shells.

1. Create and enter a directory using one command



Creating and subsequently entering a new directory is such a common task it seems that there should be a shortcut for executing both commands in the shell. While it’s not, you can add the following function to your .bashrc file:

mkcd()
{
mkdir $1
cd $1
}

Then run source .bashrc to read the changes into memory, and complete both tasks using the mkcd command:

wjgilmore@ubuntu:~$ mkcd articles
wjgilmore@ubuntu:~/articles $

2. Return to the previous directory
When you need to move from a deeply embedded directory and want to return to the original directory you could pass the previous path into the cdcommand, but a little-known cd argument makes this trivial. This sequence demonstrates the behavior:

wjgilmore@ubuntu-laptop:~/Documents/techtarget_articles/ten_command_line_tricks/test2$ cd
wjgilmore@ubuntu-laptop:~$ cd -
~/Documents/techtarget_articles/ten_command_line_tricks/test2$
wjgilmore@ubuntu-laptop:~/Documents/techtarget_articles/ten_command_line_tricks/test2$

3. Creating directory bookmarks
Continuing along with the theme of directory interaction, there are some directories that you will inevitably return to time and again. It’s possible to create bookmarks that allow you to quickly navigate to those directories by adding their paths to the $CDPATH shell variable (within your .bashrc file):




CDPATH='.:/home/wjgilmore/books'

Once added, you can navigate directly to the books directory from anywhere within the operating system path simply by executing the following command:

$ cd books

4. Deftly edit the command line
How many times have you tediously edited and executed a series of slightly dissimilar commands? Such as when building the PDF version of various book chapters I’m working on from the Markdown source I regularly execute the following command:

$ pandoc -o html/chapter06.html chapters/chapter06.md  --template=templates/html.template

In order to also build the chapter04.md source document command line novices would quickly tire of arrowing up to retrieve the previously executed (above) command from history, and then arrowing left until replacing both instances of chapter06.md with chapter04.md. There are several more efficient ways to perform this task. First, consider using Bash’s command line editing keyboard shortcuts (two modes are supported: Emacs and vi), which allow you to quickly navigate to the desired location:




Ctrl + a: Go to beginning of line
Ctrl + e: Go to end of line
Alt + f: Go forward one word
Alt + b: Go backward one word

A second and even more efficient approach involves using command line substitution. The following command will replace the 06 found in the previously executed command with 04:

$ pandoc -o html/chapter06.html chapters/chapter06.md  --template=templates/html.template
$ !!:gs/06/04
pandoc -o html/chapter04.html chapters/chapter04.md  --template=templates/html.template

Incidentally if you’re using the GNOME terminal then the meta (Alt) key won’t work as described, because GNOME terminal already binds the Alt key to toolbar commands. Alternatively you can use Shift + Alt as the meta key, but this is a bit awkward. Instead, if you don’t require the toolbar command shortcuts, disable them by navigating to Edit -> Keyboard Shortcuts… and disable the Enable menu access keys option.

5. Saving a long command for later use
When working through a sequence of system administration operations, it is possible to type a particularly long command and then realize before executing it a step in the sequence has been left out. Rather than deleting the command, you can save it to the history without executing it by appending a hash mark (#) to the beginning of the command:

$ #this is some ridiculously long command that I want to save




After pressing the Enter button, arrow up and you’ll see the command has been saved. To execute the command, just remove the hash mark from the beginning of the line before execution.

6. Save typing using command aliases
The ls command’s long listing format (ls -l) can be frequently used, but the hyphen makes it a bit unwieldy when typing furiously. You can create command aliases of for longer commands using the alias command within .bashrc. In this example, the command alias dir is substituted for ls -l:

alias dir='ls -l'

7. Saving more typing by ignoring typos
You’re in the terminal zone, blazing from one directory to the next while copying, updating and removing files at will. Or you’re not, because the fingers are moving faster than the brain or even keyboard response time can handle, causing you to constantly backtrack and correct your typos. Add the following line to your .bashrc file and the shell will automatically fix any typing blunders you make when identifying file or path names.

shopt -s cdspell

8. Opening applications in the background
When cruising around the command line, you may need to do another task such as respond to an email. Of course, it’s possible to open GUI applications from the terminal in the same way you’d execute any other command, done simply by invoking their name, in this case, opening Gimp:

$ gimp

But doing so effectively ends your terminal session, because the application will open in the foreground. If you’re regularly opening a particular application from the command-line, consider modifying its default invocation within your .bashrc file:




gimp()
{
command gimp "$@" &
}

Reload your .bashrc file (see the source command) and you’ll be able to invoke the Gimp application, passing along the names of any image files you’d like to open, with the added bonus of retaining control of the terminal.

9. Do more with less
The more command is useful for quickly perusing the contents of a text file. Once the file is loaded into the page you can use the forward slash (/) to search the file. The problem is that once you’ve found the desired string it’s not possible to navigate up and inspect the contents that appeared prior to this string. The less command doesn’t suffer from this disadvantage, allowing you to scroll both up and down within a text file. The less command is invoked in the same manner as more:

$ less sometextfile.txt




10. Clean up your command line history
The history command is easily one of the most powerful tools at your disposal. But there is one timesaver in particular that deserves mention: the $HISTIGNORE shell variable.

Over time your history list will become incredibly long. Take advantage of the $HISTIGNORE ;variable to mute the recording of any commands you deem irrelevant:

$ export $HISTIGNORE="&:cd:exit:ls"

This will cause all duplicate commands, and the cd, exit, and ls commands to be omitted from the history list.

Speed is key to mastering the command line, and these ten tips and tricks should get you started on your command line mastery. If you would like to share any other tips, please contact me via my Web site.

Source http://searchenterpriselinux.techtarget.com

maxresdefault

Linux and Unix more command tutorial with examples

 

maxresdefaultWhat is the more command in UNIX?

The more command is a command line utility for viewing the contents of a file or files once screen at a time. It supports navigating forwards and backwards through a file and is primarily used for viewing the contents of a file. It also supports searching for strings or regular expressions and opening the file at the current point in a text editor.


How to view the contents of a file

To view the contents of a file pass the name of the file to more. This will open the file in more at the start of the file and fit the first page within the screen size available.

more /usr/share/dict/british
A
a
AA
AAA
Aachen
--More--(0%)





The line at the bottom shows that the file is being viewed within the moreprogram. As more moves through the file the percentage value on the bottom line will also update reflecting how far through the file the current page is.

How to view the contents of multiple files

To view the contents of multiple files using more pass the names of the files or a pattern to the more command. This will open a buffer for each file and show the first file. A banner is shown to indicate the file being shown.

more /usr/share/dict/*
::::::::::::::
/usr/share/dict/american-english
::::::::::::::
A

To move to the next file press :n. This moves the viewer to the start of the next file.

::::::::::::::
/usr/share/dict/british
::::::::::::::
A
a





To move back a file press :p. This moves to the start of the previous file.

How to navigate within more

To move forward a page within more the SPACE key may be used. Additionally the z key may be used. This moves forward a page based on the current screen size.

To move forward one line press the RETURN key. Optionally a number n may be pressed before the RETURN key to move forward by n lines.

To move backwards by a page press b or CTRL-B. Some versions of more support moving backwards by one line with the k key but your mileage may vary here.

How to open a file at a line number

To open a file at a line number pass the + option along with a line number

more +2654 /usr/share/dict/british





The more viewer will open at line 2654.

To open a file at the first occurrence of a search string pass the + option followed by a search pattern. The search pattern should begin with a / and can be a regular expression.

more +/^eat /usr/share/dict/british

The pager will move to the first occurrence of the search pattern.

How to search within more

To search within more press the / key followed by the phrase to be searched for. The search pattern accepts regular expressions. The following searches for the phrase ‘eat’. This will search lines for instances of the phrases and scroll the page to the first occurrence.

more /usr/share/dict/british
/eat

In this file the first occurrence is the word ‘aleatory’. To search for words starting with ‘eat’ a regular expression may be used.

more /usr/share/dict/british
/^eat

Now the word ‘eat’ is found.

To search for the next occurrence of a regular expresssion press the n key.


more /usr/share/dict/british
/eat
# first match is aleatory
# press 'n'
# second match is amphitheatre

How to display the file that more is viewing

To display the file that more is viewing press :f. The file will be shown at the bottom along with the current position in the file.

more /usr/share/dict/british :f “/usr/share/dict/british” line 34298

How to edit a file being viewed with more

To edit a file being viewed with more press v. This will launch the text editor that is set in the $EDITOR shell variable at the line being viewed. Once the file is save it returns to the more viewer. If no $EDITOR variable is found viwill be used.

To understand what the editor variable is echo it at a shell prompt. In the following example it is vim.

echo $EDITOR
vim





If the $EDITOR variable is not set or is set incorrectly it may be set temporarily as follows.

export EDITOR=vim

To set the $EDITOR variable permanently add the following to your .bashrcfile if you are using bash or .zshrc file if you are using zsh.

export EDITOR=vim

Getting help within more

To access the help menu press h within more.

How to exit more

To exit from more press q or Q. This returns you to the terminal prompt.

Further reading

Source https://shapeshed.com

install_web1

The Basics of Using the Sed Stream Editor to Manipulate Text in Linux

Introduction

The sed stream editor is a text editor that performs editing operations on information coming from standard input or a file. Sed edits line-by-line and in a non-interactive way.

This means that you make all of the editing decisions as you are calling the command and sed will execute the directions automatically. This may seem confusing or unintuitive, but it is a very powerful and fast way to transform text.




This tutorial will cover some basics operations and introduce you to the syntax required to operate this editor. You will almost certainly never replace your regular text editor with sed, but it will probably become a welcomed addition to your text editing toolbox.

Basic Usage

In general, sed operates on a stream of text that it reads from either standard input or from a file.

This means that you can send the output of another command directly into sed for editing, or you can work on a file that you’ve already created.

You should also be aware that sed outputs everything to standard out by default. That means that, unless redirected, sed will print its output to the screen instead of saving it in a file.

The basic usage is:

sed [options] commands [file-to-edit]

We will copy some files into our home directory to practice some editing.


cd
cp /usr/share/common-licenses/BSD .
cp /usr/share/common-licenses/GPL-3 .

Let’s use sed to view the contents of the BSD license file we copied.

Since we know that sed sends its results to the screen by default, we can use it as a file reader by passing it no editing commands. Let’s try it:

sed '' BSD
Copyright (c) The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
...
...





This works because the single quotes contain the editing commands we are passing to sed. We passed it nothing, so it just printed each line it received to standard output.

We will demonstrate how sed can use standard input by piping the output of the “cat” command into sed to produce the same result.

cat BSD | sed ''
Copyright (c) The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
. . .
. . .

As you can see, we can operate on files or streams of text (as is produced when piping output with the “|” character) just as easily.

Printing Lines

In the previous example, we saw that input passed into sed without any operations would print the results directly to standard output.




We will now explore sed’s explicit “print” command, which is specified by using the “p” character within single quotes.

sed 'p' BSD
Copyright (c) The Regents of the University of California.
Copyright (c) The Regents of the University of California.
All rights reserved.
All rights reserved.


Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
modification, are permitted provided that the following conditions
are met:
are met:
. . .
. . .

You can see that sed has printed each line twice now. This is because it automatically prints each line, and then we’ve told it to print explicitly with the “p” command.

If you examine how the output has the first line twice, followed by the second line twice, etc., you will see that sed operates line by line. It accepts a line, operates on it, and outputs the resulting text before repeating the process on the next line.




We can clean up the results by passing the “-n” option to sed, which suppresses the automatic printing:

sed -n 'p' BSD
Copyright (c) The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
. . .
. . .

We now are back to printing each line once.

Address Ranges

The examples so far can hardly be considered editing (unless we wanted to print each line twice…). Let’s modify the output by only having sed print the first line.

sed -n '1p' BSD
Copyright (c) The Regents of the University of California.

By placing the number “1” before the print command, we have told sed the line number to operate on. We can just as easily print five lines (don’t forget the “-n”).

sed -n '1,5p' BSD
Copyright (c) The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

We’ve just given an address range to sed. If we give sed an address, it will only perform the commands that follow on those lines. In this example, we’ve told sed to print line 1 through line 5. We could have specified this in a different way with by giving the first address and then using an offset to tell sed how many additional lines to travel:

sed -n '1,+4p' BSD

This will result in the same output, because we’ve told sed to start at line 1 and then operate on the next 4 lines as well.




If we want to print every other line, we can specify the interval after the “~” character. The following line will print every other line starting with line 1:

sed -n '1~2p' BSD
Copyright (c) The Regents of the University of California.

modification, are permitted provided that the following conditions
1. Redistributions of source code must retain the above copyright
2. Redistributions in binary form must reproduce the above copyright
   documentation and/or other materials provided with the distribution.
   may be used to endorse or promote products derived from this software
. . .
. . .

Deleting Text

We can easily perform text deletion where we previously were specifying text printing by changing the “p” command to the “d” command.

We no longer need the “-n” command because with the delete command, sed will print everything that is not deleted, which will help us see what’s going on.

We can modify the last command from the previous section to make it delete every other line starting with the first. The result is that we should be given every line we were not given last time.

sed '1~2d' BSD
All rights reserved.
Redistribution and use in source and binary forms, with or without
are met:
   notice, this list of conditions and the following disclaimer.
   notice, this list of conditions and the following disclaimer in the
3. Neither the name of the University nor the names of its contributors
   without specific prior written permission.
. . .
. . .

It is important to note here that our source file is not being affected. It is still intact. The edits are output to our screen.

If we want to save our edits, we can redirect standard output to a file like so:

sed '1~2d' BSD > everyother.txt

If we open the file with cat, we will see the same output that we saw onscreen previously. Sed does not edit the source file by default for our safety.




We can change this behavior though by passing sed the “-i” option, which means perform edits in-place. This will edit the source file.

Let’s try it by editing our “everyother.txt” file we just created, in-place. Let’s further reduce the file by deleting every other line again:

sed -i '1~2d' everyother.txt

If you use cat again, you can see that the file has been edited.

As mentioned previously, the “-i” option can be dangerous! Thankfully, sed gives us the ability to create a backup file prior to editing.

To create a backup file prior to editing, add the backup extension directly after the “-i” option:

sed -i.bak '1~2d' everyother.txt

This will create a backup file with the “.bak” extension, and then edit the regular file in-place.

Substituting Text

Perhaps the most well-known use for sed is substituting text. Sed has the ability to search for text patterns using regular expressions, and then replace the found text.

In its simplest form, you can change one word to another word using the following syntax:

's/old_word/new_word/'

The “s” is the substitute command. The three slashes (/) are used to separate the different text fields. You can use other characters to delimit the fields if it would be more helpful.

For instance, if we were trying to change a website name, using another delimiter would be helpful since URLs contain slashes. We’ll use echo to pipe in an example:

echo "http://www.example.com/index.html" | sed 's_com/index_org/home_'
http://www.example.org/home.html

Do not forget the final delimiter, or sed will complain.

echo "http://www.example.com/index.html" | sed 's_com/index_org/home'
sed: -e expression #1, char 22: unterminated `s' command

Let’s create a file to practice our substitutions on:

echo "this is the song that never ends
yes, it goes on and on, my friend
some people started singing it
not knowing what it was
and they'll continue singing it forever
just because..." > annoying.txt

Now let’s substitute the expression “on” with “forward”.

sed 's/on/forward/' annoying.txt
this is the sforwardg that never ends
yes, it goes forward and on, my friend
some people started singing it
not knowing what it was
and they'll cforwardtinue singing it forever
just because...

You can see a few notable things here. First, is that we are replacing patterns, not words. The “on” within “song” is changed to “forward”.

The other thing to notice is that on line 2, the second “on” was not changed to “forward”.

This is because by default, the “s” command operates on the first match in a line and then moves to the next line.




To make sed replace every instance of “on” instead of just the first on each line, we can pass an optional flag to the substitute command.

We will provide the “g” flag to the substitute command by placing it after the substitution set.

sed 's/on/forward/g' annoying.txt
this is the sforwardg that never ends
yes, it goes forward and forward, my friend
some people started singing it
not knowing what it was
and they'll cforwardtinue singing it forever
just because...

Now the substitute command is changing every instance.

If we only wanted to change the second instance of “on” that sed finds on each line, then we could use the number “2” instead of the “g”.

sed 's/on/forward/2' annoying.txt
this is the song that never ends
yes, it goes on and forward, my friend
some people started singing it
not knowing what it was
and they'll continue singing it forever
just because...

If we only want to see which lines were substituted, we can use the “-n” option again to suppress automatic printing.

We can then pass the “p” flag to the substitute command to print lines where substitution took place.

sed -n 's/on/forward/2p' annoying.text
yes, it goes on and forward, my friend

As you can see, we can combine the flags at the end of the command.

If we want the search process to ignore case, we can pass it the “i” flag.

sed 's/SINGING/saying/i' annoying.txt
this is the song that never ends
yes, it goes on and on, my friend
some people started saying it
not knowing what it was
and they'll continue saying it forever
just because...

Referencing Matched Text

If we wish to find more complex patterns with regular expressions, we have a number of different methods of referencing the matched pattern in the replacement text.

For instance, if we want to match the from the beginning of the line to “at” we can use the expression:

sed 's/^.*at/REPLACED/' annoying.txt
REPLACED never ends
yes, it goes on and on, my friend
some people started singing it
REPLACED it was
and they'll continue singing it forever
just because...

You can see that the wildcard expression matches from the beginning of the line to the last instance of “at”.

Since you don’t know the exact phrase that will match in the search string, you can use the “&” character to represent the matched text in the replacement string.

This example shows how to put parentheses around the matched text:

sed 's/^.*at/(&)/' annoying.txt
(this is the song that) never ends
yes, it goes on and on, my friend
some people started singing it
(not knowing what) it was
and they'll continue singing it forever
just because...

A more flexible way of referencing matched text is to use escaped parentheses to group sections of matched text.

Every group of search text marked with parentheses can be referenced by an escaped reference number. For instance, the first parentheses group can be referenced with “\1”, the second with “\2” and so on.

In this example, we’ll switch the first two words of each line:

sed 's/\([a-zA-Z0-9][a-zA-Z0-9]*\) \([a-zA-Z0-9][a-zA-Z0-9]*\)/\2 \1/' annoying.txt
is this the song that never ends
yes, goes it on and on, my friend
people some started singing it
knowing not what it was
they and'll continue singing it forever
because just...

As you can see, the results are not perfect. For instance, the second line skips the first word because it has a character not listed in our character set. Similarly, it treated “they’ll” as two words in the fifth line.

Let’s improve the regular expression to be more accurate:

sed 's/\([^ ][^ ]*\) \([^ ][^ ]*\)/\2 \1/' annoying.txt
is this the song that never ends
it yes, goes on and on, my friend
people some started singing it
knowing not what it was
they'll and continue singing it forever
because... just

This is much better than last time. This groups punctuation with the associated word.




Notice how we repeat the expression inside the parentheses (once without the “*” character, and then once with it). This is because the “*” character matches the character set that comes before it zero or more times.

This means that the match with the wildcard would be considered a “match” even if the pattern is not found.

To ensure that it is found at least once, we must match it once without the wildcard before employing the wildcard.

 Conclusion

We have covered just a few of the basics of sed. You should be able to see already how you can quickly transform a text document using properly constructed sed commands.

Source https://www.digitalocean.com

fixedbyvonnie-centos-viewing-bash-history-hidden-file

Linux: Bash Delete All Files In Directory Except Few

I‘m a new Linux system user. I need to cleanup in a download directory i.e. delete all files from ~/Downloads/ folders except the following types:

*.iso – All iso images files.
*.zip – All zip files.




How do I delete all file except some in bash shell on a Linux, OS X or Unix-like systems?

Bash shell supports rich file pattern matching such as follows:

  • * - Match any files.
  • ? - Matches any single character in filenames.
  • [...] - Matches any one of the enclosed characters.

Method #1: Say hello to extended pattern matching operators

You need to use the extglob shell option using the shopt builtin command to use extended pattern matching operators such as:


  1. ?(pattern-list) – Matches zero or one occurrence of the given patterns.
  2. *(pattern-list) – Matches zero or more occurrences of the given patterns.
  3. +(pattern-list) – Matches one or more occurrences of the given patterns.
  4. @(pattern-list) – Matches one of the given patterns.
  5. !(pattern-list) – Matches anything except one of the given patterns.

A pattern-list is nothing but a list of one or more patterns (filename) separated by a |. First, turn on extglob option:

shopt -s extglob

Bash remove all files except *.zip and *.iso files





The rm command syntax is:

## Delete all file except file1 ##
rm  !(file1)
 
## Delete all file except file1 and file2 ##
rm  !(file1|file2) 
 
## Delete all file except all zip files ##
rm  !(*.zip)
 
## Delete all file except all zip and iso files ##
rm  !(*.zip|*.iso)
 
## You set full path too ##
rm /Users/vivek/!(*.zip|*.iso|*.mp3)
 
## Pass options ##
rm [options]  !(*.zip|*.iso)
rm -v  !(*.zip|*.iso)
rm -f  !(*.zip|*.iso)
rm -v -i  !(*.php)

Finally, turn off extglob option:

shopt -u extglob

Method #2: Using bash GLOBIGNORE variable to remove all files except specific ones





From the bash(1) page:

A colon-separated list of patterns defining the set of filenames to be ignored by pathname expansion. If a filename matched by a pathname expansion pattern also matches one of the patterns in GLOBIGNORE, it is removed from the list of matches.

To delete all files except zip and iso files, set GLOBIGNORE as follows:

## only works with BASH ##
cd ~/Downloads/
GLOBIGNORE=*.zip:*.iso
rm -v *
unset GLOBIGNORE

Method #3: Find command to rm all files except zip and iso files

If you are using tcsh/csh/sh/ksh or any other shell, try the following find command syntax on a Unix-like system to delete files:


find /dir/ -type f -not -name 'PATTERN' -delete

OR

## deals with weird file names using xargs ##
find /dir/ -type f -not -name 'PATTERN' -print0 | xargs -0 -I {} rm {}
find /dir/ -type f -not -name 'PATTERN' -print0 | xargs -0 -I {} rm [options] {}

To delete all files except php files in ~/sources/ directory, type:

find ~/sources/ -type f -not -name '*.php' -delete




OR

find ~/sources/ -type f -not -name '*.php' -print0 | xargs -0 -I {} rm -v {}

The syntax to delete all files except *.zip and *.iso is as follows:

Source http://www.cyberciti.biz

14-command-line-tips-tricks

14 Command Line Tips & Tricks

In this article you will find a list of 14 practical Linux command-line tips and tricks – in handy Q&A form – that are aimed to provide valuable information for Linux beginners.
14-command-line-tips-tricks
I am new to Linux. Experts Q1: advise to never log in as root. How can I find out whether I have logged in as root or not?




As you are new to Linux, the first thing that you should know is what root means and why experts say that you should never log in as root (until and unless it is absolutely required).

Root is the username for a Linux user account that has read-write-delete access to virtually anything and everything on the system. This user exists by default on every Linux distribution, though some of them (like Ubuntu) require it to be activated manually before first use. Activating here means configuring the password for root using the ‘passwd’ command. The root user is also known as superuser.

Since the root user account has unlimited privileges, you can do almost anything on a Linux system while logged in as root. For example, you can delete a standard Linux command/binary, change a system configuration file, change user passwords, alter network settings, change firewall configuration and so on. The list is endless. But, as they say, with great power comes great responsibility. Unfortunately, normal users are usually not responsible and careful enough to use the root account. Think of a scenario where a normal user – logged-in as root – accidentally changes some firewall settings of the system; or worse, accidentally executes ‘rm -rf *’ from the root directory (/).

You just cannot imagine the extent of damage that can be caused once a root account is accidentally misused, or compromised by a hacker. This is the reason why it is always advised to stay away from the root account until and unless it is absolutely necessary. Even when it is required to do some stuff that requires root privileges, instead of logging in as root, always use commands like ‘sudo’ or ‘su -c’ to gain root privileges, as these make sure that the privileges are acquired for a single command execution or for a certain period of time (at the maximum).




Sometimes when I start a program Q2: from the command line, the prompt gets blocked until I close the program. How do I stop this?

Whenever you run a command in Linux, the command prompt does not get freed up until the command completes. A command may complete in a few seconds or even take minutes, depending upon what it is up to. For example, if you are trying to find a file in a complete system using the ‘find’ command, then it may consume more time than when trying to find a file in a small directory. Similarly, copying a small text file will complete faster compared to copying a high-quality movie.

Sometimes a user will not want to wait for a command to complete and would like to continue doing other stuff in the meantime. There are multiple ways to achieve this:

– Execute your command with ‘&’ appended to it. This makes sure that the command is run in the background while the terminal is freed up immediately.

– For an already running command not executed with an appended &, stop the command using Ctrl+Z and then run the ‘bg’ command to push it into background.

Other important points :

– To list all the commands running in the background, use the command ‘jobs’.

– To bring back a command running in the background to the foreground, use the
‘fg’ command.

– If there are multiple commands running in the background, you can use the job ID (listed in the output of the ‘jobs’ command) with the ‘fg’ command to bring a specified command to the foreground.

For example, here is an executable named ‘binary’ that runs infinitely.




$ ./binary

Now, to push this command to the background, use Ctrl+Z followed by the ‘bg’ command.

$ ./binary
^Z
[1]+ Stopped
binary
$ bg
[1]+ ./binary &
$

Observe that the command prompt is freed now while the command ‘binary’ is pushed to run in the background.

Now, to check if it is running in the background, use the ‘jobs’ command.

$ jobs
[1]+ Running
binary &

Observe that the output shows the command ‘binary’ and the state in which it is running.




To bring it back to foreground, use the ‘fg’ command.

$ fg
./binary

So, you can see that the command execution of ‘binary’ comes to the foreground.

Sometimes while working with a Q3: long command, I need to move here and there to change or correct some options. Using arrow keys seems to take quite a bit of time. Is there any shortcut to traverse whole words at a time?

Yes, shortcuts exist for traversing a command word by word, both forwards and backwards. Use the combination of Ctrl + ‘right arrow key’ to move forward (one word at a time), or Ctrl + ‘left arrow key’ to move backwards (one word at a time) on command line.

Is there any shortcut to run a previously run command with
root privileges?

Yes. You can refer to last run command with ‘!!’ and use sudo before it.

$ find / -name “abc”
find: `/media/himanshu’: Permission denied
find: `/root’: Permission denied
find: `/run/udisks2’: Permission denied
find: `/run/lightdm’: Permission denied
find: `/run/wpa_supplicant’: Permission denied
find: `/run/cups/certs’: Permission denied

As you can see in the above example, we tried using the ‘find’ command to search for a file named ‘abc’, but it started giving ‘permission denied’ errors as it could not access certain locations on the system. Now, to rerun this command with root privileges, we use the following shortcut:

$ sudo !!
sudo find / -name “abc”
[sudo] password for himanshu:

So you can see that using ‘sudo’ with ‘!!’ placed sudo prior to the previously run command. This trick is particularly useful when the command being run is complex or long.

What are some shortcuts through which I can speed up
my work on the command line?

Here are a few command-line shortcuts:

Sometimes while working with long commands, you need to move the cursor to the start or end of the command. The traditional method of using arrow keys seems very slow in these cases. The faster alternative is to press Ctrl+A to send the cursor to start of the command, or Ctrl+E to send the cursor to the end of the command.




Writing names for existing files or directories while on the command line can be made faster by using the Tab key extensively. Just type in the starting few characters from the name of the file and then hit Tab. If these characters match only a single existing file or folder, the name will get autocompleted for you; otherwise options are displayed, in which case you can complete the name by typing a few more characters (to make the these initial characters unique) and hitting Tab again.

Everybody knows that the ‘clear’ command can be used to clear the terminal screen, but for this you have to type and run this command from the prompt. If you do not want to run the clear command, Ctrl+L can be used to clear the screen while retaining whatever was there on the current prompt.

Using the mouse on command line for cut-copy-paste operations is not always advised. A quick text cut on the command line can be achieved by using Ctrl+K (make sure to place cursor at the beginning of the text to cut), while paste can be done using Ctrl+Y.

Sometimes you may want to rerun a complex/long command that you executed a while ago. Usually we use the up and down arrow keys to search previously run commands. To speed things up, reverse search can be used. Just press Ctrl+R and write few characters from the start of command you’re looking for. If you still don’t get the required result, try pressing Ctrl+R repeatedly to loop through the results.

I want to know more about my Linux system. Where can I get
detailed information?

The best way to obtain information about your Linux system is by running the ‘uname’ command with various options. Here are the details of the available options…

Execute ‘uname’ without any options to display the kernel name:

$ uname -s
Linux

Execute ‘uname’ with the -r option to display the kernel release…

$ uname -r
3.8.0-23-generic

Execute ‘uname’ with the -v option to display the kernel version:

$ uname -v
#34-Ubuntu SMP Wed May 29 20:22:58 UTC 2013

Execute ‘uname’ with the -m option to display the machine hardware:

$ uname -m
x86_64

Execute ‘uname’ with the -o option to display the operating system:

$ uname -o
GNU/Linux

Sometimes I roam here and there in different directories but Q7: eventually want to come back to a certain directory. How do I make Shell remember a directory path?




For cases where you change only a single directory, you can go back to the previous directory using the command ‘cd-’.

$ pwd
/home/himanshu/Desktop
$ cd ../practice/
$ cd –
/home/himanshu/Desktop
$ pwd
/home/himanshu/Desktop

So, you can see that by using ‘cd-’, one can easily switch back to the last directory.

The above trick is fine, but in a real-world scenario we tend to hop between various directories and the final directory we want to get back to is not always the previous directory. In this case, the commands ‘pushd’ and ‘popd’ can be used.

$ pwd
/home/himanshu/Desktop
$ pushd .
~/Desktop ~/Desktop
$ cd ../practice/
$ cd /home/himanshu/
$ cd /home/
$ popd
~/Desktop
$ pwd
/home/himanshu/Desktop

You can see that a ‘pushd’ followed by a dot (.) – representing the current working directory, which was /home/himanshu/ Desktop in this case – was performed initially. This is the directory to which the user wants to come back eventually. Subsequently, many directories changes were made and then, when ‘popd’ was finally done, control switched back to the directory (/home/himanshu/Desktop) to which the user wanted to return.

What is special about files/ Q8: directories whose name begins
with a dot (.)?

There are certain files in Linux which store system-wide and user-specific configuration information. Usually these type of files start with a dot (.) and are kept hidden. This means that these files are not visible if you do a simple ‘ls’ in the directory where they reside.

$ ls
Desktop Documents Downloads
examples.desktop Music Pictures
practice Public Templates #test#
Videos

You can see in the above output that a simple ‘ls’ in a user’s home directory could not list any file whose name begins with a dot. But, this does not confirm that there are no such files present in the directory. To confirm, run ‘ls’ with the option -a.

$ ls -a
. .bashrc
Desktop examples.desktop .kde
Pictures #test# .Xauthority
.. .cache
.dmrc .gconf
.local practice .thunderbird .Xauthority.8NWRZW
.adobe .compiz Documents
gnome2 .macromedia
.profile Videos .Xauthority.THC0ZW
.bash_history .config Downloads
.gstreamer-0.10 .mozlla
Public .vim
errors
.bash_logout .dubs .emacs.d
.ICEauthority Music
Templates .viminfo .xsession-errors.old




So, you can see that there are lots of files present in this directory whose names begin with a dot. The reason why these files are hidden by default is because they are of little use for a normal user in his day-to-day work.

When I run ‘ls’ in a certain directory, I see files and directories in various colours. What do these colours mean?

Different colours are used so that a user can easily identify the type of files.

Colour support is added through the user- specific .bashrc file – specifically through the following code:

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval
“$(dircolors -b ~/.dircolors)” ||
eval “$(dircolors -b)”
alias ls=’ls –color=auto’
#alias dir=’dir –color=auto’
#alias vdir=’vdir –color=auto’
alias grep=’grep –color=auto’
alias fgrep=’fgrep –color=auto’
alias egrep=’egrep –color=auto’
fi

To decode colours, just run the following code on the command line:

$ dircolors -p

What is the difference between > and >> while using them on the
command line?

Both > and >> are used to redirect output to a file. The difference lies in the fact that > overwrites the existing content with new content while >> appends to existing content.

$ echo “Hi, this is test” > output
$ cat output
Hi, this is test
$ echo “Old Text is overwritten” > output
$ cat output
Old Text is overwritten

So, you can see that using > again and again on the same file overwrites the previous content in the file.




$ cat output
Old Text is overwritten
$ echo “Old Text is not overwritten
now” >> output
$ cat output
Old Text is overwritten
Old Text is not overwritten now

In this case you can see that by using >>, the new text is appended to the file.

Sometimes I experience problems Q11: reading long files using cat, as the text scrolls past the screen before I can read it. How can I stop this from happening?

Use ‘less’ in this case. All you need to do is run the ‘cat’ command in the following way:

$ cat [filename] | less

This will hold the output until you continuously press the Enter key on your keyboard. To exit from this mode, just press Q.

What if I want to read only the first or last few lines of a file?

You can use ‘head’ and ‘tail’ commands for this.

$ tail -5 output
/etc/brltty/en-nabcc.ttb
/etc/brltty/brl-al-abt_small.ktb
/etc/brltty/brl-al-abt_basic.kti
/etc/acpi/mediabtn.sh
/etc/fstab.d

The ‘tail’ command above displays the last five lines from the file ‘output’.

Through this command, you can also display the last ‘n’ bytes using the -c option:

$ tail -c10 output
c/fstab.d

So, you can see that last 10 bytes were displayed in the output.

Similarly, there is a ‘head’ command to display content from the beginning of a file. Here are some examples:

$ head -10 output
/boot/abi-3.8.0-19-generic
/boot/abi-3.8.0-23-generic
/boot/grub/i386-pc/search_label.mod
/sbin/acpi_available
/sbin/ip6tables
/sbin/e2label
/sbin/ntfslabel
/sbin/swaplabel
/sbin/iptables-save
/sbin/ip6tables-restore
$ head -c10 output
/boot/abi-

It seems that the ‘find’ and ‘locate’ commands do the same thing. What is the difference between the two?




Both the ‘find’ and ‘locate’ commands do the same job: search for files. However, there is a major difference between the two. The ‘find’ command actually searches for files on the disk, while the ‘locate’ command searches a database. This database is prepared through the ‘updatedb’ command.

Since ‘locate’ searches a database, it is faster in execution as compared to ‘find’, but the real problem with ‘locate’ is its dependency on the database. Suppose you introduce a new file at a specified location on the disk, but do not update the database read by the ‘locate’ command; in this case ‘locate’ would not be able to find the new file.

$ touch new_file
$ ls new_file
new_file
$ locate new_file
$ sudo updatedb
$ locate new_file /home/himanshu/practice/new_file

So, here you can see that the ‘locate’ command was not able to find new_file until its database was updated using the ‘updatedb’ command.

A similar problem would occur if you removed a file from disk but failed to update the database. The ‘locate’ command will continue showing the file in its search results until the database is updated.

$ rm new_file
$ ls new_file
ls: cannot access new_file: No such file or directory
$ locate new_file /home/himanshu/practice/new_file
$ sudo updatedb
$ locate new_file

So, you can see that even after the file new_file was removed, the ‘locate’ command kept showing a non-existent file in its search results until the database was updated again.




What if I want to shut down or restart my Linux box from the command line only?

You can use the ‘shutdown’ and ‘reboot’ commands for shutting it down or restarting it.

Besides these commands, you can change the system runlevels using the ‘init’ command, to halt or restart the system. Runlevel 0 can be used to halt the system: ($init 0). And runlevel 6 can be used to restart the system:($init 6).

Source www.gadgetdaily.xyz

f4960b8f2cfdb0f48491cfff067d4e45

25 Linux Commands and Tricks That Every Geek Should Know

1. Log Into a Linux Machine Without Knowing the Username or Password
If you come across a Linux machine that you need to gain access to but you don’t know the username or password, you can gain access by following these steps:

Restart the system and press ‘e’ or F2 to enter GRUB menu. Choose ‘ROOT’ in the options. In the command line that appears, type ‘tail /etc/passwd’ and locate the username in the text that appears. Now that you have that username, type ‘passwd USERNAME’ and enter a new password. Once finished, type EXIT, select OK to exit recovery mode, and then login with the username and new password.




2. Combining TXT files
If you have two text files with lines that are identified as below, you can join them with the following three commands. Be sure the lines match, however, and put them in the order you want the files combined.

$ cat animals.txt

100 Dogs

200 Cats

300 Lions

$ cat actions.txt

100 bark

200 meow

300 roar

$ join animals.txt actions.txt

100 Dogs bark

200 Cats meow

300 Lions roar

3. Check Out How Many Hours a Computer Has Been On
Find a system’s up-time with this piece of code. The numbers given will be listed as hours. So, for example, if it says 9.32, the system has been up for 9 hours and 32 minutes.

$ ac –d




4. View All Running Processes
Linux doesn’t have a task manager like you find in Windows. While you can download various types online, the best way to view the current running processes on your system is to open the terminal and run:

$ ps aux | more

5. Check On Total Disc Space Usage of A Directory+ Its Subs
If you’re low on disc space and you want to find out which of your directories are taking up the most space, then you can use the following command. Replace the home symbol ( ~ ) with whatever directory you want to check. For example, du -sh /etc.

# du -sh ~

6. View Active Network Connections with PID
Take a peek to see what connections are currently active on the network with this handy command.

# netstat -tap

7. Find All Files on a System Larger than X MB/GB



Say you just downloaded a 1GB+ ISO onto your system, you know it is around somewhere, but you just can’t figure out where it was saved. This little bit of code is a nifty solution for locating the file.

# find / -type f -size +1000M

8. Locate and Identify Recently Altered Files
Do you want a nice list of files that have recently been altered on any given system? If so, enter this tidbit into the terminal:

# find . –mtime -2

9. Find a Past Date
Say you need to find out rather quickly what the date was 49 days ago. To find out, type:

$ date –date=’49 days ago’

10. Find a Future Date
In the same vein as the previous example, say you need to find out what the date will be in 49. To find that out, type:

$ date –date=’3 seconds’

Note that it’s the same as the last bit, only without the word ‘ago’ added.

11. Locate Files with Specific Words in the Name



If you need to find a file on a system that has a specific name, such as ‘passwords’ or ‘taxes’, then you can search a directory with the following code:

# find ~ -name “*passwords*”

12. View Processes Run By Different Users
If you want to see what processes are running for different users that the one logged in, run this:

$ ps U oracle

13. View Items Inside Compressed (Archive) Folder
Have you ever downloaded an archive, only to discover junk inside it? The following command will reveal what is inside a zip folder before you open it.

# unzip -l var-name.zip

14: Eject Removable Media
Where it’s an iPod or an SD card, you can eject onboard media by simply typing:

EJECT

15: Save the Active Window as a JPEG



If you need to save the active window on your desktop as a JPEG but don’t want to download any special software or use PrntScrn and a photo editor, use this command:

import -window root MyTest.jpg

16: Bump User Off Network
Whether they’re doing something that is going to contaminate the network, they’re hogging resources, or you simply don’t like them, you can log a user off their computer with this handy piece of code:

skill -kill -u username

17. Block a Computer’s Access to Specific Websites
Say you’re running a business that uses Linux machines, you notice that your employees are spending a ridiculous amount of time checking the weather. You can block their ability to access those sites by opening /etc/hosts with your text editor (sudo gedit /etc/hosts) and adding:

127.0.0.1 website.com

18. Schedule Midnight Downloads
This code is incredibly handy; it allows you to schedule the time for a download to happen–say, at 3PM while you’re at work or midnight while you’re sleeping.

echo ‘wget website.com’ | at 012:00

19. Using the Terminal As Root
Using the Terminal as root is sort of like right-clicking on an application in Vista and choosing ‘run as Administrator’. It gives you the ability to do things you otherwise couldn’t do (namely, run dangerous code). To use the terminal as root, type:

sudo su

20. Disabling Password Prompt When Using Sudo



Whenever you use the ‘sudo’ command in Linux, you’re prompted to enter the user password before the command will go through. This gets annoying. The solution? Disable it. To do so, use the Terminal and type:

gedit sudo visudo

scroll down to the line that says: username ALL=(ALL) ALL

and change it to say: username ALL=(ALL) NOPASSWD: ALL

21. Change the Default Conky
If you’re using a distro that includes Conky by default, such as Crunchbang, you might wander how you can edit its settings. To do this, enter this in the Terminal:

sudo gedit ~/.conkyrc

Of course, replace ‘gedit’ with the text editor of your choice, and sudo is Ubuntu specific.

22. Put a LiveCD on a USB
Say there’s a machine you want to gain access to and copy files from, but you don’t have access to the computer’s login info. You can gain access with it using a LiveCD. The easiest way to do this is by using a USB thumb drive. You can do this by downloading a liveCD iso and then downloading UNETbootin.

Plug in your USB drive, run UNETbootin, and install the ISO with that.

23. Safely Restart Linux



Lets say you’re duped into running a fork bomb, or you download a file that promises to be one thing, only to turn out to be a massive tarbomb. How do you safely restart the frozen system? By doing the following:

Press ALT + PrntScrn and then, while holding those, type the following letters in order: REISUB.

24. View All Files (Including the Hidden Ones)
If you need to view all the files within whatever directory you’re in, including ones that are hidden, use the following bit of code:

ls -al

25: A Bonus Tip:
Never run the following:

:() { :|:& };:

…there’s something about it that begs to be run; doing so, however, will initiate a forkbomb, which will cause your system to freeze.

Source http://fearless-assassins.com

www-gifcreator-me_ue7fhm

Xiaomi announces the Mi VR, its second low-cost virtual reality headset

Lost in all of the hype surrounding the reveal of the stunningly beautiful Mi Mix, Xiaomi also took the wraps off its newest virtual reality headset, the Mi VR. The new headset, which is designed to work with the latest generation of Xiaomi smartphones including the Mi 5 and Mi Note 2, will only cost you $29, keeping with Xiaomi’s goal of offering solid hardware at lower prices.www-gifcreator-me_ue7fhm

The new Mi VR looks far better than Xiaomi’s first VR attempt at building a virtual reality headset, the Mi VR Play — and very similar to the Playstation VR. Xiaomi says the new hardware comes with a new built-in motion sensor that will keep latency low at 16ms, and also features a 9-axis motion controller and supports touch controls.




The company also launched the MIUI VR store to try and keep users engaged with the VR system, offering over 30 VR apps and over 500 panoramic videos at launch. Since Xiaomi hasn’t released its phones in the US yet, the Mi VR probably won’t make it to the States, but if and when the company does it will have a full suite of products to offer potential consumers.

Source http://www.theverge.com

why you should invest in a voip dialer

Why You Should Invest in a VoIP Dialer?

why you should invest in a voip dialer

The modern cord-cutting revolution is not just limited to Netflix and consumer cable. With the advancements in VoIP technology and increasing availability of cheap high-speed internet services, a large number of companies are letting the traditional landlines go and are now investing in a VoIP dialer. The reasons that make VoIP an excellent choice for business of every size are mentioned in this post.

The flexibility, features, and most importantly, the cheap cost of VoIP services, is encouraging an increasing number of companies to ditch their traditional landlines and look for VoIP-based solutions. While VoIP or Voice over Internet Protocol has been around for a very long time, there have been several changes to how the VoIP-based solutions are now offered to the companies. The advancements have only made VoIP easier to implement and use as compared to what it was in the past.




If you are still using the traditional communication systems, the below mentioned reasons are sure to make you switch to VoIP-based solutions.

Voip dailer

Highly Affordable




The most important reason to switch to VoIP is the cost-efficiency and savings that it offers as compared to conventional landlines. Moreover, apart from the cost of calls itself, you will also need lesser amount of hardware. As a matter of fact, there are several VoIP-based hosting services that completely eliminate the need to invest in any new hardware. And if at all, you are required to invest in new hardware, they will generally be based on technologies like SIP and not proprietary products that require you to take services from particular providers.

Excellent Choice for International Calls

No matter if you want to make long-distance calls, VoIP will still prove substantially cheaper than traditional phone-based calls. As the calls generally travel on data networks and not public phones, VoIP service providers allow you to make the calls for free. Moreover, there are also IP-PBX servers that can be used to manage remote employees.

Mobile App




Majority of the VoIP service providers now offer mobile dialer with the help of which you can receive and make calls with a working data connection. Moreover, you can also adjust these apps to enable them to ring along with the office phone or function as an extension.

Enhanced Scalability

With the growing needs of your business, VoIP-based solutions can be easily scaled to keep up with the increased requirements. Adding more VoIP network extensions is as simple as connecting an SIP-enabled device to network and making some small adjustments to the settings. Also, if the phone is certified by the VoIP service provider, adding extensions can be a simple plug-n-play process.

Companies looking for a VoIP dialer to experience these benefits can choose TP Smart Dialer from Tele Packet. This all-network dialer can easily function in any blocked areas and has several features to ensure crystal clear communications. The software is compatible with all the popular softswitches and used advanced bandwidth-saving technology to consume minimum data.

ce2193f3d79138ceab03598f5e7a6155

Linux Tips Every Geek Should Know

What separates average Linux users from the super-geeks? Simple: years spent learning the kinds of hacks, tricks, tips and techniques that turn long jobs into a moment’s work. If you want to get up to speed without having to put in all that leg-work, we’ve rounded up over 50 easy-to-learn Linux tips to help you work smarter and get the most from your computer. Enjoy!

#1: Check processes not run by you

  • Difficulty: Expert
  • Application: bash





Imagine the scene – you get yourself ready for a quick round of Crack Attack against a colleague at the office, only to find the game drags to a halt just as you’re about to beat your uppity subordinate – what could be happening to make your machine so slow? It must be some of those other users, stealing your precious CPU time with their scientific experiments, webservers or other weird, geeky things!

OK, let’s list all the processes on the box not being run by you!

ps aux | grep -v `whoami`

Or, to be a little more clever, why not just list the top ten time-wasters:

ps aux  --sort=-%cpu | grep -m 11 -v `whoami` 

It is probably best to run this as root, as this will filter out most of the vital background processes. Now that you have the information, you could just kill their processes, but much more dastardly is to run xeyes on their desktop. Repeatedly!

#2: Replacing same text in multiple files




  • Difficulty: Intermediate
  • Application: find/Perl

If you have text you want to replace in multiple locations, there are several ways to do this. To replace the text Windows with Linux in all files in current directory called test[something] you can run this:

perl -i -pe 's/Windows/Linux/;' test*

To replace the text Windows with Linux in all text files in current directory and down you can run this:

find . -name '*.txt' -print | xargs perl -pi -e's/Windows/Linux/ig' *.txt

Or if you prefer this will also work, but only on regular files:

find -type f -name '*.txt' -print0 | xargs --null perl -pi -e 's/Windows/Linux/'

Saves a lot of time and has a high guru rating!

#3: Fix a wonky terminal




  • Difficulty: Easy
  • Application: bash

We’ve all done it – accidentally used less or cat to list a file, and ended up viewing binary instead. This usually involves all sorts of control codes that can easily screw up your terminal display. There will be beeping. There will be funny characters. There will be odd colour combinations. At the end of it, your font will be replaced with hieroglyphics and you don’t know what to do. Well, bash is obviously still working, but you just can’t read what’s actually going on! Send the terminal an initialisation command:

reset

and all will be well again.

#4: Creating Mozilla keywords

  • Difficulty: Easy
  • Application: Firefox/Mozilla

A useful feature in Konqueror is the ability to type gg onion to do a Google search based on the word onion. The same kind of functionality can be achieved in Mozilla by first clicking on Bookmarks>Manage Bookmarks and then Add a New Bookmark. Add the URL as:

http://www.google.com/search?q=%s

Now select the entry in the bookmark editor and click the Properties button. Now enter the keyword as gg (or this can be anything you choose) and the process is complete. The %s in the URL will be replaced with the text after the keyword. You can apply this hack to other kinds of sites that rely on you passing information on the URL.

Alternatively, right-click on a search field and select the menu option “Add a Keyword for this Search…”. The subsequent dialog will allow you to specify the keyword to use.

#5: Running multiple X sessions




  • Difficulty: Easy
  • Application: X

If you share your Linux box with someone and you are sick of continually logging in and out, you may be relieved to know that this is not really needed. Assuming that your computer starts in graphical mode (runlevel 5), by simultaneously pressing the keys Control+Alt+F1 – you will get a login prompt. Insert your login and password and then execute:

startx -- :1

to get into your graphical environment. To go back to the previous user session, press Ctrl+Alt+F7, while to get yours back press Ctrl+Alt+F8.

You can repeat this trick: the keys F1 to F6 identify six console sessions, while F7 to F12 identify six X sessions. Caveat: although this is true in most cases, different distributions can implement this feature in a different way.

#6: Faster browsing

  • Difficulty: Easy
  • Application: KDE

In KDE, a little-known but useful option exists to speed up your web browsing experience. Start the KDE Control Center and choose System > KDE performance from the sidebar. You can now select to preload Konqueror instances. Effectively, this means that Konqueror is run on startup, but kept hidden until you try to use it. When you do, it pops up almost instantaneously. Bonus! And if you’re looking for more KDE tips, make sure you check out our article, 20 all-new KDE 4.2 tips.

#7: Backup your website easily




  • Difficulty: Easy
  • Application: Backups

If you want to back up a directory on a computer and only copy changed files to the backup computer instead of everything with each backup, you can use the rsync tool to do this. You will need an account on the remote computer that you are backing up from. Here is the command:

rsync -vare ssh jono@192.168.0.2:/home/jono/importantfiles/* /home/jono/backup/

Here we are backing up all of the files in /home/jono/importantfiles/ on 192.168.0.2 to /home/jono/backup on the current machine.

#8: Keeping your clock in time

  • Difficulty: Easy
  • Application: NTP

If you find that the clock on your computer seems to wander off the time, you can make use of a special NTP tool to ensure that you are always synchronised with the kind of accuracy that only people that wear white coats get excited about. You will need to install the ntpdate tool that is often included in the NTP package, and then you can synchronise with an NTP server:

ntpdate ntp.blueyonder.co.uk

A list of suitable NTP servers is available at www.eecis.udel.edu/~mills/ntp/clock1b.html. If you modify your boot process and scripts to include this command you can ensure that you are perfectly in time whenever you boot your computer. You could also run a cron job to update the time.

#9: Finding the biggest files

  • Difficulty: Easy
  • Application: Shell

A common problem with computers is when you have a number of large files (such as audio/video clips) that you may want to get rid of. You can find the biggest files in the current directory with:

ls -lSrh

The “r” causes the large files to be listed at the end and the “h” gives human readable output (MB and such). You could also search for the biggest MP3/MPEGs:

ls -lSrh *.mp*

You can also look for the largest directories with:

du -kx | egrep -v "\./.+/" | sort -n

#10: Nautilus shortcuts

  • Difficulty: Easy
  • Application: Nautilus

Although most file managers these days are designed to be used with the mouse, it’s also useful to be able to use the keyboard sometimes. Nautilus has a few keyboard shortcuts that can have you flying through files:

  • Open a location – Ctrl+L
  • Open Parent folder – Ctrl+Up
  • Arrow keys navigate around current folder.

You can also customise the file icons with ’emblems’. These are little graphical overlays that can be applied to individual files or groups. Open the Edit > Backgrounds and Emblems menu item, and drag-and-drop the images you want.

#11: Defrag your databases




  • Difficulty: Easy
  • Application: MySQL

Whenever you change the structure of a MySQL database, or remove a lot of data from it, the files can become fragmented resulting in a loss of performance, particularly when running queries. Just remember any time you change the database to run the optimiser:

mysqlcheck -o <databasename>

You may also find it worth your while to defragment your database tables regularly if you are using VARCHAR fields: these variable-length columns are particularly prone to fragmentation.

#12: Quicker emails

  • Difficulty: Easy
  • Application: KMail

Can’t afford to waste three seconds locating your email client? Can’t be bothered finding the mouse under all those gently rotting mountains of clutter on your desk? Whatever you are doing in KDE, you are only a few keypresses away from sending a mail. Press Alt+F2 to bring up the ‘Run command’ dialog. Type:

mailto:plop@ploppypants.com

Press return and KMail will automatically fire up, ready for your words of wisdom. You don’t even need to fill in the entire email address. This also works for Internet addresses: try typing www.slashdot.org to launch Konqueror.

#13: Parallelise your build

  • Difficulty: Easy
  • Application: GCC

If you’re running a multiprocessor system (SMP) with a moderate amount of RAM, you can usually see significant benefits by performing a parallel make when building code. Compared to doing serial builds when running make (as is the default), a parallel build is a vast improvement. To tell make to allow more than one child at a time while building, use the -j switch:

make -j4; make -j4 modules

#14: Save battery power

  • Difficulty: Intermediate
  • Application: hdparm

You are probably familiar with using hdparm for tuning a hard drive, but it can also save battery life on your laptop, or make life quieter for you by spinning down drives.

hdparm -y /dev/hdb
hdparm -Y /dev/hdb
hdparm -S 36 /dev/hdb

In order, these commands will: cause the drive to switch to Standby mode, switch to Sleep mode, and finally set the Automatic spindown timeout. This last includes a numeric variable, whose units are blocks of 5 seconds (for example, a value of 12 would equal one minute).

Incidentally, this habit of specifying spindown time in blocks of 5 seconds should really be a contender for a special user-friendliness award – there’s probably some historical reason for it, but we’re stumped. Write in and tell us if you happen to know where it came from!

#15: Wireless speed management

  • Difficulty: Intermediate
  • Application: iwconfig

The speed at which a piece of radio transmission/receiver equipment can communicate with another depends on how much signal is available. In order to maintain communications as the available signal fades, the radios need to transmit data at a slower rate. Normally, the radios attempt to work out the available signal on their own and automatically select the fastest possible speed.

In fringe areas with a barely adequate signal, packets may be needlessly lost while the radios continually renegotiate the link speed. If you can’t add more antenna gain, or reposition your equipment to achieve a better enough signal, consider forcing your card to sync at a lower rate. This will mean fewer retries, and can be substantially faster than using a continually flip-flopping link. Each driver has its own method for setting the link speed. In Linux, set the link speed with iwconfig:

iwconfig eth0 rate 2M

This forces the radio to always sync at 2Mbps, even if other speeds are available. You can also set a particular speed as a ceiling, and allow the card to automatically scale to any slower speed, but go no faster. For example, you might use this on the example link above:

iwconfig eth0 rate 5.5M auto

Using the auto directive this way tells the driver to allow speeds up to 5.5Mbps, and to run slower if necessary, but will never try to sync at anything faster. To restore the card to full auto scaling, just specify auto by itself:

iwconfig eth0 rate auto

Cards can generally reach much further at 1Mbps than they can at 11Mbps. There is a difference of 12dB between the 1Mbps and 11Mbps ratings of the Orinoco card – that’s four times the potential distance just by dropping the data rate!

#16: Unclog open ports

  • Difficulty: Intermediate
  • Application: netstat

Generating a list of network ports that are in the Listen state on a Linux server is simple with netstat:

root@catlin:~# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 
tcp 0 0 0.0.0.0:5280 0.0.0.0:* LISTEN 698/perl 
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 217/httpd 
tcp 0 0 10.42.3.2:53 0.0.0.0:* LISTEN 220/named 
tcp 0 0 10.42.4.6:53 0.0.0.0:* LISTEN 220/named 
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 220/named 
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 200/sshd 
udp 0 0 0.0.0.0:32768 0.0.0.0:* 220/named 
udp 0 0 10.42.3.2:53 0.0.0.0:* 220/named 
udp 0 0 10.42.4.6:53 0.0.0.0:* 220/named 
udp 0 0 127.0.0.1:53 0.0.0.0:* 220/named 
udp 0 0 0.0.0.0:67 0.0.0.0:* 222/dhcpd 
raw 0 0 0.0.0.0:1 0.0.0.0:* 7 222/dhcpd

That shows you that PID 698 is a Perl process that is bound to port 5280. If you’re not root, the system won’t disclose which programs are running on which ports.

#17: Faster Hard drives




  • Difficulty: Expert
  • Application: hdparm

You may know that the hdparm tool can be used to speed test your disk and change a few settings. It can also be used to optimise drive performance, and turn on some features that may not be enabled by default. Before we start though, be warned that changing drive options can cause data corruption, so back up all your important data first. Testing speed is done with:

hdparm -Tt /dev/hda

You’ll see something like:

/dev/hda:
Timing buffer-cache reads:   128 MB in  1.64 seconds =78.05 MB/sec
Timing buffered disk reads:  64 MB in 18.56 seconds = 3.45MB/sec

Now we can try speeding it up. To find out which options your drive is currently set to use, just pass hdparm the device name:

hdparm /dev/hda
 /dev/hda:
 multcount    =  16 (on)
 I/O support  =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 40395/16/63, sectors = 40718160, start = 0

This is a fairly default setting. Most distros will opt for safe options that will work with most hardware. To get more speed, you may want to enable dma mode, and certainly adjust I/O support. Most modern computers support mode 3, which is a 32-bit transfer mode that can nearly double throughput. You might want to try

hdparm -c3 -d1/dev/hda

Then rerun the speed check to see the difference. Check out the modes your hardware will support, and the hdparm man pages for how to set them.

#18: Uptime on your hands

  • Difficulty: Expert
  • Application: Perl

In computing, wasted resources are resources that could be better spent helping you. Why not run a process that updates the titlebar of your terminal with the current load average in real-time, regardless of what else you’re running?

Save this as a script called tl, and save it to your ~/bin directory:

#!/usr/bin/perl -w

use strict;
$|++;

my $host=`/bin/hostname`;
chomp $host;

while(1) {

open(LOAD,"/proc/loadavg") || die "Couldn't open /proc/loadavg: $!\n";

my @load=split(/ /,<LOAD>);
close(LOAD);


print "$host: $load[0] $load[1] $load[2] at ", scalar(localtime);
print "\007";

sleep 2;
}

When you’d like to have your titlebar replaced with the name, load average, and current time of the machine you’re logged into, just run tl&. It will happily go on running in the background, even if you’re running an interactive program like Vim.

#19: Grabbing a screenshot without X

  • Difficulty: Easy
  • Application: Shell

There are plenty of screen-capture tools, but a lot of them are based on X. This leads to a problem when running an X application would interfere with the application you wanted to grab – perhaps a game or even a Linux installer. If you use the venerable ImageMagick import command though, you can grab from an X session via the console. Simply go to a virtual terminal (Ctrl+Alt+F1 for example) and enter the following:

chvt 7; sleep 2; import -display :0.0 -window root sshot1.png; chvt 1;

The chvt command changes the virtual terminal, and the sleep command gives it a while to redraw the screen. The import command then captures the whole display and saves it to a file before the final chvt command sticks you back in the virtual terminal again. Make sure you type the whole command on one line.

This can even work on Linux installers, many of which leave a console running in the background – just load up a floppy/CD with import and the few libraries it requires for a first-rate run-anywhere screen grabber.

#20: Access your programs remotely

  • Difficulty: Easy
  • Application: X

If you would like to lie in bed with your Linux laptop and access your applications from your Windows machine, you can do this with SSH. You first need to enable the following setting in /etc/ssh/sshd_config:

X11Forwarding yes

We can now run The GIMP on 192.168.0.2 with:

ssh -X 192.168.0.2 gimp

#21: Making man pages useful




  • Difficulty: Easy
  • Application: man

If you are looking for some help on a particular subject or command, man pages are a good place to start. You normally access a man page with man <command>, but you can also search the man page descriptions for a particular keyword. As an example, search for man pages that discuss logins:

man -k login

When you access a man page, you can also use the forward slash key to search for a particular word within the man page itself. Simply press / on your keyboard and then type in the search term.

#22: Talk to your doctor!

  • Difficulty: Easy
  • Application: Emacs

To say that Emacs is just a text editor is like saying that a Triumph is just a motorcycle, or the World Cup is just some four-yearly football event. True, but simplified juuuust a little bit. An example? Open the editor, press the Esc key followed by X and then enter in doctor: you will be engaged in a surreal conversation by an imaginary and underskilled psychotherapist. And if you want to waste your time in a better way

Esc-X tetris

will transform your ‘editor’ into the old favourite arcade game.

Does the madness stop there? No! Check out your distro’s package list to see what else they’ve bundled for Emacs: we’ve got chess, Perl integration, IRC chat, French translation, HTML conversion, a Java development environment, smart compilation, and even something called a “semantic bovinator”. We really haven’t the first clue what that last one does, but we dare you to try it out anyway! (Please read the disclaimer first!)

#23: Generating package relationship diagrams

  • Difficulty: Easy
  • Application: Debian

The most critical part of the Debian system is the ability to install a package and have the dependencies satisfied automatically. If you would like a graphical representation of the relationships between these packages (this can be useful for seeing how the system fits together), you can use the Graphviz package from Debian non-free (apt-get install graphviz) and the following command:

apt-cache dotty > debian.dot

The command generated the graph file which can then be loaded into dotty:

dotty debian.dot

#24: Unmount busy drives

  • Difficulty: Easy
  • Application: bash

You are probably all too familiar with the situation – you are trying to unmount a drive, but keep getting told by your system that it’s busy. But what application is tying it up? A quick one-liner will tell you:

lsof +D /mnt/windows

This will return the command and process ID of any tasks currently accessing the /mnt/windows directory. You can then locate them, or use the kill command to finish them off.

#25: Text file conversion

  • Difficulty: Easy
  • Application: recode

recode is a small utility that will save you loads of effort when using text files created on different platforms. The primary source of discontent is line breaks. In some systems, these are denoted with a line-feed character. In others, a carriage return is used. In still more systems, both are used. The end result is that if you are swapping text from one platform to another, you end up with too many or too few line breaks, and lots of strange characters besides.

However, the command parameters of recode are a little arcane, so why not combine this hack with HACK 26 in this feature, and set up some useful aliases:

alias dos2unix='recode dos/CR-LF..l1'
alias unix2win='recode l1..windows-1250'
alias unix2dos='recode l1..dos/CR-LF'

There are plenty more options for recode – it can actually convert between a whole range of character sets. Check out the man pages for more information.

#26: Listing today’s files only

  • Difficulty: Easy
  • Application: Various

You are probably familiar with the problem. Sometime earlier in the day, you created a text file, which now is urgently required. However, you can’t remember what ridiculous name you gave it, and being a typical geek, your home folder is full of 836 different files. How can you find it? Well, there are various ways, but this little tip shows you the power of pipes and joining together two powerful shell commands:

ls -al --time-style=+%D | grep `date +%D`

The parameters to the ls command here cause the datestamp to be output in a particular format. The cunning bit is that the output is then passed to grep. The grep parameter is itself a command (executed because of the backticks), which substitutes the current date into the string to be matched. You could easily modify it to search specifically for other dates, times, filesizes or whatever. Combine it with HACK 26 to save typing!

#27: Avoid common mistypes and long commands

  • Difficulty: Easy
  • Application: Shell

The alias command is useful for setting up shortcuts for long commands, or even more clever things. From HACK 25, we could make a new command, lsnew, by doing this:

alias lsnew=" ls -al --time-style=+%D | grep `date +%D` "

But there are other uses of alias. For example, common mistyping mistakes. How many times have you accidentally left out the space when changing to the parent directory? Worry no more!

alias cd..="cd .."

Alternatively, how about rewriting some existing commands?

alias ls="ls -al"

saves a few keypresses if, like us, you always want the complete list.

To have these shortcuts enabled for every session, just add the alias commands to your user .bashrc file in your home directory.

#28: Alter Mozilla’s secret settings

  • Difficulty: Easy
  • Application: Mozilla

If you find that you would like to change how Mozilla works but the preferences offer nothing by way of clickable options that can help you, there is a special mode that you can enable in Mozilla so that you can change anything. To access it, type this into the address bar:

about:config

You can then change each setting that you are interested in by changing the Value field in the table.

Other interesting modes include general information (about:), details about plugins (about:plugins), credits information (about:credits) and some general wisdom (about:mozilla).

#29: A backdrop of stars

  • Difficulty: Easy
  • Application: KStars

You may already have played with KStars, but how about creating a KStars backdrop image that’s updated every time you start up?

KStars can be run with the –dump switch, which dumps out an image from your startup settings, but doesn’t load the GUI at all. You can create a script to run this and generate a desktop image, which will change every day (or you can just use this method to generate images).

Run KStars like this:

kstars --dump --width 1024 --height 768 --filename = ~/kstarsback.png

You can add this to a script in your ~/.kde/Autostart folder to be run at startup. Find the file in Konqueror, drag it to the desktop and select ‘Set as wallpaper’ to use it as a randomly generated backdrop.

#30: Open an SVG directly

  • Difficulty: Easy
  • Application: Inkscape

You can run Inkscape from a shell and immediately edit a graphic directly from a URL. Just type:

inkscape http://www.somehost.com/graphic.svg

Remember to save it as something else though!

#31: Editing without an editor

  • Difficulty: Intermediate
  • Application: Various

Very long files are often hard to manipulate with a text editor. If you need to do it regularly, chances are you’ll find it much faster to use some handy command-line tools instead, like in the following examples.

To print columns eg 1 and 3 from a file file1 into file2, we can use awk:

awk '{print $1, $3}' file1 > file2

To output only characters from column 8 to column 15 of file1, we can use cut:

cut -c 8-15 file1 > file2

To replace the word word1 with the word word2 in the file file1, we can use the sed command:

sed "s/word1/word2/g" file1 > file2

This is often a quicker way to get results than even opening a text editor.

#32: Backup selected files only

  • Difficulty: Intermediate
  • Application: tar

Want to use tar to backup only certain files in a directory? Then you’ll want to use the -T flag as follows. First, create a file with the file you want to backup:

cat >> /etc/backup.conf
# /etc/passwd
# /etc/shadow
# /etc/yp.conf
# /etc/sysctl.conf
EOF

Then run tar with the -T flag pointing to the file just created:

tar -cjf bck-etc-`date +%Y-%m-%d`.tar.bz2 -T /etc/backup.conf

Now you have your backup.

#33: Merging columns in files

  • Difficulty: Intermediate
  • Application: bash

While splitting columns in files is easy enough, merging them can be complicated. Below is a simple shell script that does the job:

#!/bin/sh
length=`wc -l $1 | awk '{print $1}'`
count=1
[ -f $3 ] && echo "Optionally removing $3" && rm -i $3
while [ "$count" -le "$length" ] ; do
      a=`head -$count $1 | tail -1`
      b=`head -$count $2 | tail -1`
      echo "$a      $b" >> $3
      count=`expr $count + 1`
done

Give to this script the name merge.sh and make it executable with:

chmod u+x merge.sh

Now, if you want to merge the columns of file1 and file2 into file3, it’s just matter of executing

/path/to/merge.sh file1 file2 file3

where /path/to has to be replaced with the location of merge.sh in your filesystem.

#34: Case sensitivity

  • Difficulty: Intermediate
  • Application: bash

Despite the case of a word not making any difference to other operating systems, in Linux “Command” and “command” are different things. This can cause trouble when moving files from Windows to Linux. tr is a little shell utility that can be used to change the case of a bunch of files.

#!/bin/sh
for i in `ls -1`; do
        file1=`echo $i | tr [A-Z] [a-z] `
        mv $i $file1 2>/dev/null
done

By executing it, FILE1 and fiLe2 will be renamed respectively file1 and file2.

#35: Macros in Emacs

  • Difficulty: Intermediate
  • Application: Emacs

When editing files, you will often find that the tasks are tedious and repetitive, so to spare your time you should record a macro. In Emacs, you will have to go through the following steps:

  1. Press Ctrl+X to start recording.
  2. Insert all the keystrokes and commands that you want
  3. Press Ctrl+X to stop when you’re done.

Now, you can execute that with

Ctrl -u <number> Ctrl -x e

where <number> is the number of times you want to execute the macro. If you enter a value of 0, the macro will be executed until the end of the file is reached. Ctrl -x e is equivalent to Ctrl -u 1 Ctrl-x e.

#36: Simple spam killing




  • Difficulty: Intermediate
  • Application: KMail

Spam, or unsolicited bulk email, is such a widespread problem that almost everyone has some sort of spam protection now, out of necessity. Most ISPs include spam filtering, but it isn’t set to be too aggressive, and most often simply labels the spam, but lets it through (ISPs don’t want to be blamed for losing your mails).

The result is that, while you may have anti-spam stuff set up on the client-side, you can make its job easier by writing a few filters to remove the spam that’s already labelled as such. The label is included as a header. In KMail, you can just create a quick filter to bin your mail, or direct it to a junk folder. The exact header used will depend on the software your ISP is using, but it’s usually something like X-Spam-Flag = YES for systems like SpamAssassin.

Simply create a filter in KMail, choose Match Any of the Following and type in the header details and the action you require. Apply the filter to incoming mail, and you need never be troubled by about half the volume of your spam ever again.

#37: Read OOo docs without OOo

  • Difficulty: Intermediate
  • Application: OpenOffice.org

Have you ever been left with an OOo document, but no OpenOffice.org in which to read it? Thought you saved it out as plain text (.txt), but used the StarOffice .sxw format instead? The text can be rescued. Firstly, the sxw file is a zip archive, so unzip it:

unzip myfile.sxw

The file you want is called ‘content.xml’. Unfortunately, it’s so full of xml tags it’s fairly illegible, so filter them out with some Perl magic:

cat content.xml | perl -p -e  "s/<[^>]*>/ /g;s/\n/ /g;s/ +/ /;"

It may have lost lots of formatting, but at least it is now readable.

#38: Find and execute

  • Difficulty: Intermediate
  • Application: find

The find command is not only useful for finding files, but is also useful for processing the ones it finds too. Here is a quick example.

Suppose we have a lot of tarballs, and we want to find them all:

find . -name '*.gz'

will locate all the gzip archives in the current path. But suppose we want to check they are valid archives? The gunzip -vt option will do this for us, but we can cunningly combine both operations, using xargs:

find . -name '*.gz' | xargs gunzip -vt

#39: Use the correct whois server

  • Difficulty: Intermediate
  • Application: whois

The whois command is very useful for tracking down Internet miscreants and the ISPs that are supplying them with service. Unfortunately, there are many whois servers, and if you are querying against a domain name, you often have to use one which is specific to the TLD they are using. However, there are some whois proxies that will automatically forward your query on to the correct server. One of these is available athttp://whois.geektools.com.

whois -h whois.geektools.com  plop.info

#40: Where did that drive mount?

  • Difficulty: Intermediate
  • Application: bash

A common problem with people who have lots of mountable devices (USB drives, flash memory cards, USB key drives) is working out where that drive you just plugged in has ended up?

Practically all devices that invoke a driver – such as usb-storage – will dump some useful information in the logs. Try

dmesg | grep SCSI

This will filter out recognised drive specs from the dmesg output. You’ll probably turn up some text like:

SCSI device sda: 125952 512-byte hdwr sectors (64 MB)

So your device is at sda.

#41: Autorun USB devices

  • Difficulty: Expert
  • Application: hotplug scripts

Want to run a specific application whenever a particular device is added? The USB hotplug daemon can help you! This service is notified when USB devices are added to the system. For devices that require kernel drivers, the hotplug daemon will call a script by the same name in /etc/hotplug/usb/, for example, a script called usb-storage exists there. You can simply add your own commands to the end of this script (or better still, tag a line at the end of it to execute a script elsewhere). Then you can play a sound, autosync files, search for pictures or whatever.

For devices that don’t rely on kernel drivers, a lookup table is used matching the USB product and manufacturer ID. Many distros already set this up to do something, but you can customise these scripts pretty easily. See http://jphoto.sourceforge.net/?selected=sync for an example of what can be done.

#42: Rename and resize images

  • Difficulty: Expert
  • Application: bash

Fond of your new camera but can’t put up with the terrible names? Do you want also to prepare them for publishing on the web? No problem, a simple bash script is what you need:

#!/bin/sh
counter=1
root=mypict
resolution=400x300
for i in `ls -1 $1/*.jpg`; do
        echo "Now working on $i"
        convert -resize $resolution $i ${root}_${counter}.jpg
        counter=`expr $counter + 1`
done

Save the script in a file called picturename.sh and make it executable with

chmod u+x picturename.sh

and store it somewhere in your path. Now, if you have a bunch of .jpg files in the directory /path/to/pictdir, all you have to do is to execute

picturename.sh /path/to/pictdir

and in the current directory you’ll find mypict_1.jpg, mypict_2.jpg etc, which are the resized versions of your original ones. You can change the script according to your needs, or, if you’re just looking for super-simple image resizing, try looking at the mogrify command with its -geometry parameter.

#43: Secure logout

  • Difficulty: Easy
  • Application: bash

When you are using a console on a shared machine, or indeed, just on your own desktop, you may find that when you logout, the screen still shows a trace of who was logged in and what you were doing. A lot of distros will clear the screen, but some don’t. You can solve this by editing your ~/.bash_logout file and adding the command:

clear

You can add any other useful commands here too.

#44: Transferring files without ftp or scp

  • Difficulty: Easy
  • Application: netcat

Need to transfer a directory to another server but do not have FTP or SCP access? Well this little trick will help out using the netcat utility. On the destination server run:

nc -l -p 1234 | uncompress -c | tar xvfp -

And on the sending server run:

tar cfp - /some/dir | compress -c | nc -w 3 [destination] 1234

Now you can transfer directories without FTP and without needing root access.

#45: Backing up a Debian package list

  • Difficulty: Easy
  • Application: Debian

If you are running Debian and have lost track of which packages you are running, it could be useful to get a backup of your currently installed packages. You can get a list by running:

dpkg --get-selections > debianlist.txt

This will put the entire list in debianlist.txt. You could then install the same packages on a different computer with:

dpkg --set-selections < debianlist.txt

You should bear in mind that you would also need to copy over configuration files from /etc when copying your system to a new computer.

To actually install the selections, use:

apt-get -u dselect-upgrade.

#46: Hardening ssh

  • Difficulty: Easy
  • Application: ssh

Although SSH is a pretty secure way to connect to your server, there are two simple changes you can make that will boost its security even further. First, you almost certainly don’t want people logging in directly as root – instead, they should logon as a normal user, then use the su command to switch over. You can change this simply in the /etc/ssh/ssh_config file by adding the line:

PermitRootLogin  no

Now the only way to get root privilges is through su, which means crackers now need to break two passwords to get full access. While you are editing that file, find the line which says:

Protocol 2, 1

And change it to:

Protocol 2

This removes the option to fallback on the original SSH protocol, now considered very vulnerable.

#47: Stop replying to pings

  • Difficulty: Easy
  • Application: sysctl

While ping is a very useful command for discovering network topology, the disadvantage is that it does just that, and makes it easier for hackers on the network to target live servers. But you can tell Linux to ignore all pings – the server simply won’t respond. There are a number of ways to achieve this, but the best is to use sysctl. To turn off ping replies:

sysctl -w net.ipv4.icmp_echo_ignore_all=1

To turn it back on, again use:

sysctl -w net.ipv4.icmp_echo_ignore_all=0

If turning off ping is too severe for you, take a look at the next hack.

#48: Slow down ping rates

  • Difficulty: Easy
  • Application: sysctl

You may want to keep the ability to reply to pings, but protect yourself from a form of attack known as a ‘ping flood’. So how can you manage such a feat? The easiest way is to slow down the rate at which the server replies to pings. They are still valid, but won’t overload the server:

sysctl -w net.ipv4.icmp_echoreply_rate=10

This slows the rate at which replies are sent to a single address.

#49: Clean up KDE on logout

  • Difficulty: Easy
  • Application: bash

On Windows there are plenty of programs that do stuff like clean out your web cache, remove temporary files and all sorts of other stuff when you logout. Wouldn’t it be cool to do this on Linux too? With KDE, you don’t need to even install any new software, as the startkde script will automatically run scripts you put in special places.

First, you need to create a directory called shutdown in your .kde directory:

mkdir /home/username/.kde/shutdown

Now create a script to do any stuff you like on shutdown. Here is an example:

#!/bin/bash
#clear up temp folder
rm -rf ~/tmp/*
#clear out caches
rm -rf ~/.ee/minis/*
rm -rf ~/.kde/share/cache/http/*
# delete konqueror form completions
rm ~/.kde/share/apps/khtml/formcompletions

Now make sure you set the correct permissions:

chmod ug+x ~/.kde/shutdown/cleanup.sh

(or whatever you called it). As well as cleaning up sensitive files, you can also have global shutdown scripts for all users, by placing the script in your default KDE folder, in a subfolder called shutdown. To find out which is your default KDE directory, try:

kde-config --path exe

#50: Password-less ssh

  • Difficulty: Intermediate
  • Application: ssh

Tired of typing your password every time you log into the server? ssh also supports keys, so you’ll only have to type in your password when you log in to the desktop. Generate a keypair on your desktop machine:

ssh-keygen -t dsa -C your.email@ddress

Enter a passphrase for your key. This puts the secret key in ~/.ssh/id_dsa and the public key in ~/.ssh/id_dsa.pub. Now see whether you have an ssh-agent running at present:

echo $SSH_AGENT_PID

Most window managers will run it automatically if it’s installed. If not, start one up:

eval $(ssh-agent)

Now, tell the agent about your key:

ssh-add

and enter your passphrase. You’ll need to do this each time you log in; if you’re using X, try adding

SSH_ASKPASS=ssh-askpass ssh-add

to your .xsession file. (You may need to install ssh-askpass.) Now for each server you log into, create the directory ~/.ssh and copy the file ~/.ssh/id_dsa.pub into it as ~/.ssh/authorized_keys . If you started the ssh-agent by hand, kill it with

ssh-agent -k

when you log out.

#51: Using rsync over ssh

  • Difficulty: Intermediate
  • Application: Shell

Keep large directory structures in sync quickly with rsync. While tar over SSH is ideal for making remote copies of parts of a filesystem, rsync is even better suited for keeping the filesystem in sync between two machines. To run an rsync over SSH, pass it the -e switch, like this:

rsync -ave ssh greendome:/home/ftp/pub/ /home/ftp/pub/

Note the trailing / on the file spec from the source side (on greendome.) On the source spec, a trailing / tells rsync to copy the contents of the directory, but not the directory itself. To include the directory as the top level of what’s being copied, leave off the /:

rsync -ave ssh bcnu:/home/six .

This will keep a copy of the ~/six/ directory on village in sync with whatever is present on bcnu:/home/six/. By default, rsync will only copy files and directories, but not remove them from the destination copy when they are removed from the source. To keep the copies exact, include the –delete flag:

rsync -ave ssh  --delete greendome:~one/reports .

Now when old reports are removed from ~one/reports/ on greendome, they’re also removed from ~six/public_html/reports/ on the synced version, every time this command is run. If you run a command like this in cron, leave off the v switch. This will keep the output quiet (unless rsync has a problem running, in which case you’ll receive an email with the error output). Using SSH as your transport for rsync traffic has the advantage of encrypting the data over the network and also takes advantage of any trust relationships you already have established using SSH client keys.

#52: Asset scanning

  • Difficulty: Intermediate
  • Application: nmap

Normally, when people think of using nmap, they assume it’s used to conduct some sort of nefarious network reconnaissance in preparation for an attack. But as with all powerful tools, nmap can be made to wear a white hat, as it’s useful for far more than breaking into networks. For example, simple TCP connect scans can be conducted without needing root privileges:

nmap rigel

nmap can also scan ranges of IP addresses by specifying the range or using CIDR notation:

nmap 192.168.0.1-254
nmap 192.168.0.0/24

nmap can provide much more information if it is run as root. When run as root, it can use special packets to determine the operating system of the remote machine by using the -O flag. Additionally, you can do half-open TCP scanning by using the -sS flag. When doing a half-open scan, nmap will send a SYN packet to the remote host and wait to receive the ACK from it; if it receives an ACK, it knows that the port is open.

This is different from a normal three-way TCP handshake, where the client will send a SYN packet and then send an ACK back to the server once it has received the initial server ACK. Attackers typically use this option to avoid having their scans logged on the remote machine.

nmap -sS -O rigel
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on rigel.nnc (192.168.0.61):
(The 1578 ports scanned but not shown below are in state: filtered)
Port       State       Service
7/tcp      open     echo 
9/tcp      open     discard 
13/tcp     open     daytime 
19/tcp     open     chargen 
21/tcp     open     ftp 
22/tcp     open     ssh 
23/tcp     open     telnet 
25/tcp     open     smtp 
37/tcp     open     time 
79/tcp     open     finger 
111/tcp    open     sunrpc 
512/tcp    open     exec 
513/tcp    open     login 
514/tcp    open     shell 
587/tcp    open     submission 
7100/tcp   open     font-service 
32771/tcp  open     sometimes-rpc5 
32772/tcp  open     sometimes-rpc7 
32773/tcp  open     sometimes-rpc9 
32774/tcp  open     sometimes-rpc11 
32777/tcp  open     sometimes-rpc17 
Remote operating system guess: Solaris 9 Beta through Release on SPARC
Uptime 44.051 days (since Sat Nov  1 16:41:50 2003)
Nmap run completed -- 1 IP address (1 host up) scanned in 166 seconds

With OS detection enabled, nmap has confirmed that the OS is Solaris, but now you also know that it’s probably Version 9 running on a SPARC processor.

One powerful feature that can be used to help keep track of your network is nmap’s XML output capabilities. This is activated by using the -oX command-line switch, like this:

nmap -sS -O -oX scandata.xml rigel

This is especially useful when scanning a range of IP addresses or your whole network, because you can put all the information gathered from the scan into a single XML file that can be parsed and inserted into a database. Here’s what an XML entry for an open port looks like:

<port protocol="tcp" portid="22">

<state state="open" />
<service name="ssh" method="table" conf="3" />
</port>

nmap is a powerful tool. By using its XML output capabilities, a little bit of scripting, and a database, you can create an even more powerful tool that can monitor your network for unauthorized services and machines.

#53: Backup your bootsector




  • Difficulty Expert
  • Application Shell

Messing with bootloaders, dual-booting and various other scary processes can leave you with a messed up bootsector. Why not create a backup of it while you can:

dd if=/dev/hda of=bootsector.img bs=512 count=1

Obviously you should change the device to reflect your boot drive (it may be sda for SCSI). Also, be very careful not to get things the wrong way around – you can easily damage your drive! To restore use:

dd if=bootsector.img of=/dev/hda 

#54: Protect log files

  • Difficulty: Expert
  • Application: Various

During an intrusion, an attacker will more than likely leave telltale signs of his actions in various system logs: a valuable audit trail that should be protected. Without reliable logs, it can be very difficult to figure out how the attacker got in, or where the attack came from. This info is crucial in analysing the incident and then responding to it by contacting the appropriate parties involved. But, if the break-in is successful, what’s to stop him from removing the traces of his misbehaviour?

This is where file attributes come in to save the day (or at least make it a little better). Both Linux and the BSDs have the ability to assign extra attributes to files and directories. This is different from the standard Unix permissions scheme in that the attributes set on a file apply universally to all users of the system, and they affect file accesses at a much deeper level than file permissions or ACLs.

In Linux, you can see and modify the attributes that are set for a given file by using the lsattr and chattr commands, respectively. At the time of this writing, file attributes in Linux are available only when using the ext2 and ext3 filesystems. There are also kernel patches available for attribute support in XFS and ReiserFS. One useful attribute for protecting log files is append-only. When this attribute is set, the file cannot be deleted, and writes are only allowed to append to the end of the file.

To set the append-only flag under Linux, run this command:

chattr +a  filename

See how the +a attribute works: create a file and set its append-only attribute:

touch /var/log/logfile
echo "append-only not set" > /var/log/logfile
chattr +a /var/log/logfile
echo "append-only set" > /var/log/logfile
bash: /var/log/logfile: Operation not permitted

The second write attempt failed, since it would overwrite the file. However, appending to the end of the file is still permitted:

echo "appending to file" >> /var/log/logfile
cat /var/log/logfile
append-only not set
appending to file

Obviously, an intruder who has gained root privileges could realise that file attributes are being used and just remove the append-only flag from our logs by running chattr -a. To prevent this, we need to disable the ability to remove the append-only attribute. To accomplish this under Linux, use its capabilities mechanism.

The Linux capabilities model divides up the privileges given to the all-powerful root account and allows you to selectively disable them. In order to prevent a user from removing the append-only attribute from a file, we need to remove the CAP_LINUX_IMMUTABLE capability. When present in the running system, this capability allows the append-only attribute to be modified. To modify the set of capabilities available to the system, we will use a simple utility called lcap (http://packetstormsecurity.org/linux/admin/lcap-0.0.3.tar.bz2).

To unpack and compile the tool, run this command:

tar xvfj lcap-0.0.3.tar.bz2 && cd lcap-0.0.3 && make

Then, to disallow modification of the append-only flag, run:

./lcap CAP_LINUX_IMMUTABLE
./lcap CAP_SYS_RAWIO

The first command removes the ability to change the append-only flag, and the second removes the ability to do raw I/O. This is needed so that the protected files cannot be modified by accessing the block device they reside on. It also prevents access to /dev/mem and /dev/kmem, which would provide a loophole for an intruder to reinstate the CAP_LINUX_IMMUTABLE capability. To remove these capabilities at boot, add the previous two commands to your system startup scripts (eg /etc/rc.local). You should ensure that capabilities are removed late in the boot order, to prevent problems with other startup scripts. Once lcap has removed kernel capabilities, they can be reinstated only by rebooting the system.

Before doing this, you should be aware that adding append-only flags to your log files will most likely cause log rotation scripts to fail. However, doing this will greatly enhance the security of your audit trail, which will prove invaluable in the event of an incident.

#55: Automatically encrypted connections

  • Difficulty: Expert
  • Application: FreeS/WAN

One particularly cool feature supported by FreeS/WAN is opportunistic encryption with other hosts running FreeS/WAN. This allows FreeS/WAN to transparently encrypt traffic between all hosts that also support opportunistic encryption. To do this, each host must have a public key generated to use with FreeS/WAN. This key can then be stored in a DNS TXT record for that host. When a host that is set up for opportunistic encryption wishes to initiate an encrypted connection with another host, it will look up the host’s public key through DNS and use it to initiate the connection.

To begin, you’ll need to generate a key for each host that you want to use this feature with. You can do that by running the following command:

ipsec newhostkey --output /tmp/`hostname`.key

Now you’ll need to add the contents of the file that was created by that command to /etc/ipsec.secrets:

cat /tmp/`hostname`.key >> /etc/ipsec.secrets

Next, you’ll need to generate a TXT record to put into your DNS zone. You can do this by running a command similar to this one:

ipsec showhostkey --txt @colossus.nnc

Now add this record to your zone and reload it. You can verify that DNS is working correctly by running this command:

ipsec verify
Checking your system to see if IPsec got installed and started correctly
Version check and ipsec on-path  [OK]
Checking for KLIPS support in kernel   [OK]
Checking for RSA private key (/etc/ipsec.secrets)   [OK]
Checking that pluto is running   [OK]
DNS checks. 
Looking for TXT in forward map: colossus   [OK]
Does the machine have at least one non-private address   [OK]

Now just restart FreeS/WAN – you should now be able to connect to any other host that supports opportunistic encryption. But what if other hosts want to connect to you? To allow this, you’ll need to create a TXT record for your machine in your reverse DNS zone.

You can generate the record by running a command similar to this:

ipsec showhostkey --txt 192.168.0.64

Add this record to the reverse zone for your subnet, and other machines will be able to initiate opportunistic encryption with your machine. With opportunistic encryption in use, all traffic between the hosts will be automatically encrypted, protecting all services simultaneously.

#56: Eliminate suid binaries




  • Difficulty: Intermediate
  • Application: find

If your server has more shell users than yourself, you should regularly audit the setuid and setgid binaries on your system. Chances are you’ll be surprised at just how many you’ll find. Here’s one command for finding all of the files with a setuid or setgid bit set:

find / -perm +6000 -type f -exec ls -ld {} \; > setuid.txt &

This will create a file called setuid.txt that contains the details of all of the matching files present on your system. To remove the s bits of any tools that you don’t use, type:

chmod a-s program

#57: Mac filtering Host AP

  • Difficulty: Expert
  • Application: iwpriv

While you can certainly perform MAC filtering at the link layer using iptables or ebtables, it is far safer to let Host AP do it for you. This not only blocks traffic that is destined for your network, but also prevents miscreants from even associating with your station. This helps to preclude the possibility that someone could still cause trouble for your other associated wireless clients, even if they don’t have further network access.

When using MAC filtering, most people make a list of wireless devices that they wish to allow, and then deny all others. This is done using the iwpriv command.

iwpriv wlan0 addmac 00:30:65:23:17:05
iwpriv wlan0 addmac 00:40:96:aa:99:fd
  ...
iwpriv wlan0 maccmd 1
iwpriv wlan0 maccmd 4

The addmac directive adds a MAC address to the internal table. You can add as many MAC addresses as you like to the table by issuing more addmac commands. You then need to tell Host AP what to do with the table you’ve built. The maccmd 1 command tells Host AP to use the table as an “allowed” list, and to deny all other MAC addresses from associating. Finally, the maccmd 4 command boots off all associated clients, forcing them to reassociate. This happens automatically for clients listed in the table, but everyone else attempting to associate will be denied.

Sometimes, you only need to ban a troublemaker or two, rather than set an explicit policy of permitted devices. If you need to ban a couple of specific MAC address but allow all others, try this:

iwpriv wlan0 addmac 00:30:65:fa:ca:de
iwpriv wlan0 maccmd 2
iwpriv wlan0 kickmac 00:30:65:fa:ca:de

As before, you can use addmac as many times as you like. The maccmd 2 command sets the policy to “deny,” and kickmac boots the specified MAC immediately, if it happens to be associated. This is probably nicer than booting everybody and making them reassociate just to ban one troublemaker. Incidentally, if you’d like to remove MAC filtering altogether, try maccmd 0.

If you make a mistake typing in a MAC address, you can use the delmac command just as you would addmac, and it (predictably) deletes the given MAC address from the table. Should you ever need to flush the current MAC table entirely but keep the current policy, use this command:

iwpriv wlan0 maccmd 3

Finally, you can view the running MAC table by using /proc:

cat /proc/net/hostap/wlan0/ap_control 

The iwpriv program manipulates the running Host AP driver, but doesn’t preserve settings across reboots. Once you are happy with the contents of your MAC filtering table, be sure to put the relevant commands in an rc script to run at boot time.

Note that even unassociated clients can still listen to network traffic, so MAC filtering actually does very little to prevent eavesdropping. To combat passive listening techniques, you will need to encrypt your data.

Source http://www.tuxradar.com

move-files-to-new-directory

7 Neat Linux Tricks That Newbies Need to Know

As a Linux newbie, it’s normal to struggle. Everything just feels so different from Windows and you find yourself scratching your head at the simplest of tasks. And while the command line makes Linux life much easier, it can be intimidating for a beginner.

Fortunately, all it takes is a few simple tricks to get you comfortable within the terminal. Give it a few days and you may actually end up preferring the command line! Granted, there is a learning curve, but it’s not as hard as you think. I promise.




If you’ve never used the command line before, I’d recommend that you first get acquainted with terminal before continuing. But if you’re feeling confident, feel free to keep reading anyway.

Finding the Right Command

A fresh terminal is an endless sea of possibilities. You can do so much with it, which is exactly why it’s so terrifying. With so many commands available at the tips of your fingers, how on Earth are you supposed to know which ones to use in a given situation?

linux-newbie-tricks-apropos

The good news: you don’t have to memorize anything. Using the apropos command, you can quickly figure out which commands lead to the actions you want to perform.

apropos "description"

By typing the above, you’ll get a list of all commands that match the “description” string with said command’s help string. So if I were to type:

apropos "list directory"




This results in all of the commands that have “list directory” included in the help string. For my system, that means the dir, ls, ntfsls, and vdir commands.

Execute a Previous Command

Anyone who uses Linux for an extended period of time will eventually resort to the command line for troubleshooting. When that day comes for you, you may find yourself typing and retyping a lot of the same commands.

One way to get around this is to hit the Up key, which will cycle through past commands you’ve typed. This is what most newbies end up doing, but there’s a better way.

linux-newbie-tricks-history

The history command will list all of the commands you entered since the terminal launched along with an identifying number next to each command. You can repeat any of the listed commands by typing:

!#

where # is the number listed to the command you want to repeat. It’s much more convenient than mashing the Up key a million times to find that one command that needs repeating.




Similarly, you can type !! to repeat the last entered command.

Run Commands At a Specific Time

Let’s say you want to run a command but not at this exact moment. For whatever reason, let’s say there’s a particular command (or set of commands) that need to be executed at a given time in the future. Linux allows it.

at 8:30 AM 03/21/15

With the at command, you can specify a date and time. Doing so will open up an input prompt where you can enter a sequence of commands to be run at the date and time you gave. When you’re done, type Ctrl + D to quit the input prompt.

The parameter for date and time is extremely flexible. To get a better idea of the right format, check out this overview of the at command.

Easy Task Management

Windows has a lot of task manager programs that provide graphical ways to manage open applications and running processes. Linux doesn’t have something like that, but you can achieve something similar with the htop command.

Most Linux distros don’t come with htop installed. If you’re on Ubuntu or an Ubuntu-derived distro, the following should work:

sudo apt-get install htop




Once htop is installed, you can run it by typing htop on the command line. When you do, you’ll get a full overview of all the processes running on your system along with details like process IDs, CPU and RAM usage, and how long they’ve been running.

linux-newbie-tricks-htop

What I love about htop, as opposed to the default top command, is the ease of use. Tap the cursor keys left and right to scroll through the details (if they don’t all fit in terminal’s width) and up and down to scroll through the other listed processes.

Other features, like sorting, make it easier to find what you need, and the color-coded text makes it all easier to read at a glance.

Easy Filesystem Navigation





Another useful command is ranger, which doesn’t come as a default application on most Linux distros, but it’s simple to install. Again, if you’re on Ubuntu or an Ubuntu-derived distro, you should be able to get it with:

sudo apt-get install ranger

What does ranger do? Once installed, type ranger in the command line and your terminal will transform into an interface that makes it easy to navigate your entire filesystem using just a keyboard (though you can use your mouse too, if you want).

linux-newbie-tricks-ranger

Each column represents a directory. Use the left key to go up one directory, the right key to enter the selected directory, and the up and down keys to browse the current directory. It’s surprising just how much faster it is to browse a filesystem this way as opposed to clicking on folders in Nautilus.

Keep Software Up-to-date With PPAs

On Ubuntu, the software on your system is managed by something called a package manager. The package manager maintains a list of repositories, which are source locations for package downloads. Every Linux distro comes with a core set of repositories.Your Guide to Ubuntu Repositories and Package Management Your Guide to Ubuntu Repositories and Package Management

But what if you want to install an application that doesn’t exist in the core repositories? You have to find a repository that does have it, then manually add that repository to your package manager. That’s where personal package archives (PPAs) come in handy.




sudo add-apt-repository <PPA repository>

This can be a confusing notion for Linux newbies, so don’t fret if you don’t understand it right away. Reading this What Are PPAs? post on AskUbuntu should get you started on the right foot. Once you understand PPAs, you’ll never struggle with new software installations ever again.

Keyboard Shortcuts for Efficiency

Lastly, here are a few keyboard shortcuts that can drastically speed up your command line usage once they become second nature.

  • Alt+Backspace: Deletes the previous word.
  • Alt+F: Skips ahead to the next space.
  • Alt+B: Skips back to the previous space.
  • Ctrl+U: Cuts all text up to the cursor.
  • Ctrl+K: Cuts all text after the cursor until end of line.
  • Ctrl+A: Moves the cursor to the start of line.
  • Ctrl+E: Moves the cursor to the end of line.

Individually, these commands may seem like bit of a gimmick, and I wouldn’t blame you for thinking so. However, once you start combining them together, it can really speed things up when you need to retype commands.

Are You More Comfortable Now?

The command line doesn’t have to be scary; it just takes a bit of time to get comfortable with the most essential commands. Once you’re comfortable, you’ll wonder how you ever survived without the efficiency of a command line.

Source http://www.makeuseof.com

Roles of a SEO Company in Business Success

Roles of a SEO Company in Business Success

Roles of a SEO Company in Business Success

The biggest technological advancement that our country is facing along with the rest of the world is the internet. With more and more people understanding the use of internet and learning to use it everyday, its global audience is in the millions. While the internet is great in all that it does, the need to understand how it works and use it effectively is not something that everyone knows how to do.




One of the biggest things about the internet now is that there are too many brands that are converting to a digital platform without having a basic understanding of how to optimize it for the best results. This is where SEO companies come in the picture. With various services to ensure that your company is always visible on this constantly changing platform, here are some of the basic services that are offered by SEO companies:

Design

seo company in delhi ncr

In order to help the customer understand the kind of products you are catering and to make the entire process a lot simpler, many seo company in Delhi offer website design as part of their package. The design elements will ensure that the website is simple and easy to understand making the customer have a seamless user experience. This in turn will leave a lasting impression in their mind and boost sales up as well.

Articles




SEO articles are important in order to ensure that the traffic to the website is always steady. By targeting certain words and generating helpful articles about the same, you can be assured that your website will have a high number of clicks as well as increase the sales and services offered by your company.

Keywords

Best seo company in delhi ncr

When you talk about SEO, the first thing that comes to your mind is the keyword and content generation. The best SEO companies in Delhi NCR ensure that they have a foolproof strategy and a great system for keyword analysis as it definitely helps to bring traffic to the website. This is a very underrated system and if you are looking to make your website a hug, this is something that should definitely be considered.

Links




In order to ensure that there is more website traffic, SEO companies offer packages with more links to direct people to your website This is done after going through the SEO content and understanding what people are really looking out for. These links are an integral part of the services offered by many SEO companies in Delhi NCR.

Rankings

seo company in delhi

This is extremely critical as it helps you understand how the company or the website is doing. Along with these rankings and reports, the SEO companies do ensure that you have a definitive idea of how you are going to improve the website and what kind of services you need to add or remove to the same. Rankings will help you make good changes to the website and the SEO companies normally give you suggestions on what works and what doesn’t so you can streamline it well.

These are some of the most important roles of an SEO company. If you are looking to incorporate the same for your business, YNG media is a great company to start with. With seamless experience and a great rapport, they offer amazing offers and services.

fs-ubuntu-icons

A Beginner’s Guide to Free Linux Operating Systems

An Introduction to Linux Operating Systems for Complete Beginner’s

Linux is a family of free and open source computer operating systems. They are most commonly used as workstations by programmers, to run website servers, or in ’embedded electronics’ (basically anything from internet routers to robots). But they can also be used by regular computer users on a laptop or desktop machine, and are even available for mobile phones and tablets.fs-ubuntu-icons

Although learning to use Linux may take a little time, as it is a bit different from popular operating systems like Windows, Mac OS-X and Android, there are several big advantages to making the switch to Linux.




The biggest advantage is the fact that it is free. The operating system is actually a significant part of the cost of buying a computer, so if you are looking for a cheap machine then Linux is definitely worth taking a look at. Although many big technology retailers do not stock computers with Linux operating systems installed it is not difficult to buy them over the internet or from the kind of local independent retailer which offers computer repairs and also sells machines (just ask them if you don’t see anything on display, and they will probably make you a custom machine for a very low price). You can also install it on a computer which you already own (its great if you have an old machine with an outdated OS), and you can even use it on your current computer whilst still keeping your regular operating system! (see below for details of how to do this).

Because of the free and open source ethos of this operating system you will also find that there is a wide variety of software available for free, meaning that not only do you pay less for your initial purchase but you can also get lots of free software tools to do everything that you want or need.

Security is another major benefit of Linux operating systems. The way that they are built means that they are much more secure – much harder to hack into. The fact that this is a less popular operating system also means that there are fewer hackers working on malicious software to break into it. These are the same reasons why Apple is more secure and less prone to viruses and hacker attacks than Windows – but they go double for Linux. This means that there are very few recorded examples of Linux viruses, and none which have ever survived ‘in the wild’ (rather than in proof of concept demonstrations). Because of this, many users don’t even feel the need to bother getting separate anti-virus software (meaning more savings as well as increased peace of mind for you!).




Linux is also a very flexible operating system, which is available in many different flavours for different types of user, and which can be customized much more than any of its more popular rivals. The different flavours which are available are called ‘distributions’. Because it has been released under a permissive open source license, a wide range of independent developers are able to create their own versions of Linux to ‘distribute’. Linux itself is actually based on another open source operating system called Unix – the same code base that the Apple Mac OS is built on.

And finally, if you have ever considered learning how to write code then Linux will definitely make your life a lot easier. It comes with a wide range of different languages already installed, and there are many more free open source programming tools available for this OS than there are for Windows or Mac – and many of those which are also available on other operating systems are better and easier to install and use on Linux.

You can even get a cheap micro-controller like the Raspberry Pi which runs a Linux operating system and learn about programming, electronics and even robotics, or get something like a Kano kit which aims to teach kids computer science with a simple kit to make and program your own mini-computer!

Linux Distribution List

There are so many different distributions out there that there is no way I can provide any kind of comprehensive list. Also, although I have included most of the more popular distributions, this is not meant to be a ‘top list’. Instead I have tried to include a good range of different OS to be relevant to the widest possible range of different types of user and different use cases. I’ve excluded any distribution designed for web hosting servers or IT professionals, as I think its unlikely anyone wanting these would need to read an article like this to choose the right OS for their purposes. For each one I have included a brief description and a link for you to explore further if it takes your fancy.




Each of the main ‘flavours’ of Linux have themselves been modified by other developers and distributed as new operating systems. Where this is the case I have given the main distribution its own sub-heading, followed by a list of its children.

Debian

Debian is by far the most popular family of Linux distributions. The main Debian OS is very stable and user-friendly, making it a good choice for beginners who want to get their teeth stuck into learning the system without having to worry about annoying bugs and glitches. In addition to reliability, the developers behind Debian have focussed on making their OS work with a broad range of different hardware, and on ensuring that a wide range of free software is available for their users. You can get the main distribution of Debian here.

  • Mint: A relatively new player on the block, Mint has quickly grown into one of the most popular Linux operating systems. it is actually available in two editions – one based on Debian and the other on Ubuntu (see below), but I will only include it once in this list. It aims to do more ‘out of the box’ than the main Debian package, with a more customized, user-friendly and polished desktop experience. It is particular good for the multimedia codecs which it includes. Mint is a good choice for regular users (non-programmers) and is one of the more beginner friendly distributions.
  • TAILS: ‘The Amnesic Incognito Live System’, or TAILS for short, is a privacy oriented version of Debian which forces all connections to go through the TOR browser, making users completely anonymous (to learn more about TOR check out my hub on the exploring the DarkNet). If you are bothered by the degree to which the NSA and other ‘big brother’ organisations are spying on everyone, or you find the amount of that data multinational corporations collect about you a bit creepy and disturbing, then this may well be the perfect OS for you.
  • 64 Studio: Designed for multimedia creatives, DJs and serious media fans this OS has a wide variety of tools for music and video editing or production available for free and already integrated into the system.

Ubuntu





Ubuntu is actually built on top of Debian, meaning that they share many features and most Debian software packages will work on Ubuntu. It has many of its own distributions, however, so I’ve included it as a sub;heading. Ubuntu focusses on ease of use and the development of convenient user friendly features. It also aims to increase the range of available software by relaxing Debian’s strict quality control review process, meaning that there is more cutting edge software available, and new software is often available on Ubuntu before Debian. Ubuntu is available for desktop computers, laptops, tablets and phones. You can find out more about the main Ubuntu distribution here.

  • Mythbuntu: By packaging together the Ubuntu operating system with the MythTV free and open source home theatre solution, Mythbuntu is able to offer an easy to install and highly customizable operating system for users to create their own media server, home theatre PC or set top box.
  • Lubuntu: Focussing on speed and efficiency this OS offers excellent energy efficiency and is able to work well even on cheap, less powerful machines.
  • Kubuntu: Apparently the ‘friendliest’ Linux system, Kubuntu aims to create a more familiar and user-friendly graphical user interface. It is marketed as an ‘open source alternative to Windows’, and Windows users will probably find this to be the most familiar of all the Linux distributions and one of the easiest to learn.
  • Edubuntu: This system is aimed at those involved in primary and secondary school educations, and makes a wide range of educational tools available for free to its users.

Gentoo





The Gentoo distribution aims to create a highly optimized system which is both very customizable and also high performance. The main distro is aimed at more confident users, but some of its variants are more user friendly. You can find the Gentoo website here.

  • Chromium OS: An open source operating system with a similar look and feel to Google’s chrome web browser. This is primarily a web based operating system aimed at people who spend most of their computer time on the internet and don’t need to a lot of software installed on the machine itself. Another lightweight version is Cr OS, which is excellent for less powerful netbook machines. Either of these is good for beginners and less confident users.
  • Gentoox: Fancy hacking your Xbox? Gentoox is Gentoo based operating system designed to be installed on Xbox games consoles.

Fedora

Fedora has a strong focus on free software, whilst also making the latest cutting edge technologies available to its users. You can learn more about the Fedora Project here.

  • Qubes: A desktop OS designed for the security conscious.
  • Kororaa: A more beginner friendly version of Fedora.

Test Drive Linux by Booting from a Memory Stick





If you are thinking about giving Linux a try but don’t want to take the risk of installing it one your computer, or buying a new machine with it already installed, when you don’t know if you’ll like it or be able to use it well, then have no fear! You can boot Linux from a CD or USB memory stick without installing it on your machine. This is perfect for taking it for a ‘test drive’ to see if you like it before making a more permanent commitment, and is also used by some people to have a portable operating system which they can use on any computer. This is called a ‘live cd’ or ‘live stick’ boot, and will leave no trace of the operating system or anything you have done while using it on the computer you boot onto. You can easily buy a CD or memory stick with the OS already on it, but that wouldn’t really be in keeping with the free spirit of Linux so I would recommend downloading the necessary software and making your own – its not difficult. See how to create a bootable USB for Ubuntu, for example.Did you know you can also run multiple operating systems on a single machine? This allows you to have Linux to play with, learn, explore, and take advantage of the multitude of free software packages, whilst still being able to use your old familiar programs and apps.

A Beginner’s Guide to Using Ubuntu

Linux Command Line

Although many of the more beginner friendly versions of Linux have well developed graphical user interfaces which make using them much more like using one of the more popular operating systems, the real power of this software comes when you learn to use the command line. This means controlling your computer by writing text commands to get directly to what you want and make the machine do exactly what you tell it to, rather than navigating through menus and file explorers and using pre-defined functions.




Using this makes Linux more difficult to learn than other operating systems, but also much more flexible and powerful. Basically this is a form of computer programming, but rather than writing a whole piece of software you are usually just writing short and simple commands composed of just a few words. Taking the time to the command line is an excellent introduction to more advanced programming, and can turn anyone into a power user capable of getting much more out of a machine than you would with Windows or a Mac.

To get an idea of what this is like I have included a video below which is aimed at beginners and demonstrates many of the most common commands.

Source https://turbofuture.com
98d78b0eeddc38a0c6c2b26afa56fda4_original

Reboot Your Commute: Tern Vektron Folding Electric Bike

About this project

Electric bikes let you escape the typical hassles of commuting. They soften hills and headwinds on your 15-mile commute, and leave you with energy to spare.




Still, electric bikes are large and unwieldy. It’s hard to take them on trains, put them in cars, or store them indoors. The Vektron is different. With the world’s leading electric bike system from Bosch, it folds in 10 seconds for easy transport, storage, and theft prevention.

With the Vektron (formerly known as the Elektron), you can…

CONQUER HILLS & LONG DISTANCES





Steep uphills become a thrill, and you’ll easily maintain up to 20 mph to cover ground quickly.

AVOID THE SWEAT





Arrive at your destination without having to spend time and energy to shower and change.

OUTSMART BIKE THIEVES

It doesn’t matter what kind of lock you use. The only way to maximize the security of your bike is to store it indoors. With the Vektron, you can fold it, roll it into the elevator, and store it under your desk.

GO FURTHER





Take your Vektron on a train or bus to cover those extra-long commutes. Ride to the station, hop on, hop off, and keep riding. Already taking public transport? Complete the first and last leg of your commute faster by riding, instead of walking.

CHANGE PLANS MIDSTREAM

Last-minute dinner invite? Change of weather? You won’t be stuck wondering what to do with your bike. Just fold it, and throw it in the trunk of an Uber, taxi, or friend’s car.

You can even avoid downtown traffic and parking fees. Just park your car on the edge of downtown, pull your Vektron out of the trunk, and ride the rest of the way into the office.

We’re passionate about helping people get around cities. Tapping into our expertise in urban cycling and folding technology, we’ve designed our dream commuting bike.

We just previewed the Vektron at the world’s largest bicycle trade show in Germany. Here’s what the bike experts had to say about it…

 project video thumbnail

 

There are other folding electric bikes but none ride better. Why?




1) Nobody is better than us at developing stiff and stable folding bikes that ride outstandingly well. 

2) Nobody is better than Bosch at creating powerful, quiet electric drive systems that sync so elegantly with your pedaling. 

Thanks to the unique geometry and a super low center of gravity, the Vektron's ride quality compares favorably to even the best large-wheel electric bikes.

Thanks to the unique geometry and a super low center of gravity, the Vektron’s ride quality compares favorably to even the best large-wheel electric bikes.

Ride quality is always our #1 most important feature. See what our Team Captain says about how the Vektron rides…

 project video thumbnail

 




Once you fold your Vektron, it’s easy to move around in roll mode. Just extend the seatpost, and use the saddle as your push handle. We’ve even built in a comfy GripPad™ under the nose of the saddle.

 

The Vektron folds so small that you can fit a few in the back of your car for weekend getaways.

Fast forward to the good part of the ride
Fast forward to the good part of the ride

 

School runs have never been more fun! The Vektron is designed to fit the Yepp Maxi Easyfit child seat (children up to 6 yrs and/or 48.4 lb).

The Vektron resizes in seconds—no tools required—so you can share the bike with anyone in your family between 4’10” and 6’5”.

Quickly adjusts to riders of different sizes.
Quickly adjusts to riders of different sizes.

 

Adjust your handlebar position—in seconds—for comfort, aerodynamics, and resizing.
Adjust your handlebar position—in seconds—for comfort, aerodynamics, and resizing.

 




Bosch is the market leader in electric bike drivetrains with a system that charges fast, offers incredible mileage, and delivers a natural cycling feel. It’s powerful, intuitive to use, and is backed by stellar service.

DRIVE UNIT

Adapted from Bosch’s automotive applications, the Drive Unit provides pedal assist up to 20 mph. It delivers just the right support demanded by the terrain. The centered but low positioning on the bike is ideal for power, efficiency, and stability.

CONTROL PANEL




The on-board computer feeds you information such as speed, range, battery level, and distance. And the smart range calculator constantly updates the remaining range, just like a typical German car.

With the push of a button, you can switch between four riding modes, and add between 50% and 250% of your pedaling power. Changing riding modes feels smooth, and you don’t need to take your hands off the handlebars.

There’s even a handy walk-assist mode for pushing up driveways and ramps.

BATTERY

This high-energy 400 watt-hour battery drives the Vektron for a whopping 40 – 80 miles, depending on conditions such as the terrain, headwinds, riding mode, etc.

 

 

With our folding technology and the Bosch system, we’re creating an unbeatable combination. Back our Kickstarter campaign, and get a Vektron for $300 to $425 under the eventual retail price. Plus, you won’t have to worry about sales tax.

You can change your reward at anytime during the campaign. 

Want to take the kids on your commute? The Yepp Maxi Easyfit seat works seamlessly with the Vektron’s rear rack. It normally sells for $199.95 but we’ll ship one with your bike if you add $175 to your pledge during the campaign. (We only have black seats.)

Just back this project and pick a reward. You will essentially be pre-ordering the Vektron at a one-time-only discount. Here’s what you need to do…




1. Click the “Back this Project” button 

2. Select a reward (Due to Kickstarter restrictions, you can only choose ONE reward.)

3. Increase your pledge amount by $175 to add a Yepp seat (Optional) 

4. Click “Continue” and enter payment information 

5. Click “Pledge”

That’s it. You won’t be charged until the campaign ends, and only if we reach our funding goal. We’ll get your shipping information after the campaign is over.

Source https://www.kickstarter.com

kodak-768x372

Kodak Refreshes Identity With Retro-Inspired Logo

The new logo returns to a variation of the red and yellow marque originally used by Kodak during the 1970s and 1980s.

Kodak has redesigned its logo for the first time in a decade, opting to bring back a similar iteration of the “iconic” Kodak K first introduced in 1971.

New York-based studio Work-Order has designed the new identity, which features a graphic red K symbol set against a yellow background.




But unlike the 1971 and 1987 iterations of the logo, which saw the word “Kodak” positioned horizontally within the red K, it is now written vertically within the new version.

Inspired by founder George Eastman

The new ident sees a marked change from Kodak’s most recent logo update, which had been used since 2006 and featured the company’s name in a red, sans-serif typeface with a yellow underline.

Kodak’s vice president of global brand and creative, Danielle Atkins, says a big part of the inspiration behind the redesign was looking back at the heritage of the brand and the story of Kodak’s founder, George Eastman, “weaving his vision back into the brand.”

Atkins says the decision to bring back the Kodak K was validated when the company carried out brand recognition research, revealing that 58% of respondents recognised the brand from the outline of the logo alone.

“Respectful to the legacy of the brand”

“We wanted to let the logo be new again,” says Work-order partner, Keira Alexandra. “We were extremely careful to be respectful to the legacy of the brand, honouring the science and creative vision of Kodak.”




The announcement comes as Kodak today revealed its Ektra smartphone, which operates on the Android operating system and has a 21-megapixel fast focus camera.

Available from December, the brand’s first smartphone will offer DSLR functionality and 4K video capture, retailing at £449.

The new logo has now been rolled out across Kodak’s digital channels, and is also embossed onto the back of the Ektra smartphone.

kodak




kodak5
kodak6
www-gifcreator-me_8uez8r

Nikon’s New Wireless Tethering Feature Will Change The Way You Take Pictures

Nikon announced the D500, the company’s latest top-of-the-line APS-C DSLR, at CES back in January. The $2,000 camera finally hit store shelves early this summer, and I spent a few weeks using it as my main walkaround camera. It is an exceptional camera, offering deep manual controls, the ability to shoot up to 10 frames per second, and capture 4K video.www-gifcreator-me_8uez8r

But the most unique feature of the D500 is that it was the first Nikon camera with Snapbridge. Snapbridge is Nikon’s way of using Bluetooth Low Energy to establish an always-on connection between your camera and your phone. It’s an evolution of the idea of a Wi-Fi-connected camera, and it’s fantastic.




In fact, it’s so good that Snapbridge makes every other solution for connecting your phone to a camera feel archaic. It’s really that much faster and more reliable than methods used by other camera makers. It’s not flawless — the initial connection process is buggy, and if you ever losethe connection with your phone you have to deal with the headache of unpairing and repairing the two devices. But when Snapbridge works, which is almost all of the time, it feels like the best possible way to quickly access, edit, and share photos from a full-size camera.




Smartphones have been eating into the camera market in a huge way over the last half decade. To staunch the bleeding, camera companies started trying to build a bridge between smartphones and their products. One of the earliest manifestations of this was the Eye-Fi card, an SD card with a small wireless radio that let you transfer photos from the card to your phone. It was a novel idea, but in practice it was always buggy, slow, or both. And recently, things somehow got even worse for Eye-Fi users — the company is phasing out its older Wi-Fi SD cards and users are going to lose some of that functionality.

Around the same time that Eye-Fi hit the scene, companies started building Wi-Fi right into their cameras. This let you shoot photos, pull out your phone, open an app, and gain access to the files that you just created with that camera. Wi-Fi also allowed for relatively fast file transfers.

What Nikon has done with Snapbridge is similar in many ways. You shoot with the D500 (or other new Snapbridge-equipped Nikon product, like the D3400, or the company’s forthcoming action cameras), and then you’re able to access those photos on your smartphone via the Snapbridge app, download the ones you like, and post, edit, or share them to your heart’s desire. You’re essentially wirelessly tethering the camera to your phone.




The real difference is that always on connection. Snapbridge uses Bluetooth Low Energy to connect to your phone, which means that pairing stays put even if you turn the D500 off. (It even remains if you swap out the camera’s battery!) Using BLE also means that the camera won’t drain your phone’s battery, too. Better yet, it eliminates the most annoying part of using Wi-Fi on cameras, which is that you always have to reconnect your phone to the camera, either because your phone jumped to another Wi-Fi connection or because the camera powered down its Wi-Fi radio. (This was always especially annoying on iPhones, where you’d have to constantly go back to the settings menu to reconnect to the camera’s Wi-Fi.)

One of the reasons camera companies hadn’t turned to BLE is because the transfer speeds can be slow. The D500 even takes around 10 seconds to transfer full resolution photos, and it won’t work with RAW files. But Snapbridge defaults to creating and transferring 2-megapixel versions of the photos you take. That’s just high-resolution enough to look fine on Instagram and, in many cases, even Facebook. (You can definitely tell the difference between the low-res images and full-resolution ones on a Retina screen, though.)

My favorite thing about Snapbridge is the feature I thought I would hate the most. The app has a mode that lets the camera automatically send those 2-megapixel versions of every photo you take to your phone. I’m a total over-shooter — I like to rely heavily on burst shooting to make sure I get the right shot and get it in focus — so I was skeptical of this aspect of Snapbridge. But I was wrong.

Knowing that every photo was being transferred to my phone made me dial back the amount of burst shooting I did with the D500 (a tough decision to make, I might add, since the D500 can shoot a thrilling 10 frames per second). I became more decisive with what I shot. And even during moments when I wasn’t, the 2-megapixel files didn’t bog down my 64GB iPhone. (An aside: Snapbridge is available on both Android and iOS, but I used it most with my iPhone 6. iPhones tend to be frustrating when it comes to wireless connections — especially Wi-Fi — so I was expecting Snapbridge to be a problem. It’s not!)




With the D500 and Snapbridge, I almost completely ignored my iPhone’s camera. It was like I didn’t need it anymore. Every time I wanted to take a picture I opted for the D500, knowing that in a few seconds it would be waiting for me on my phone. The ultimate example of this was at a friend’s wedding. Normally, I’d have posted photos from my iPhone to Instagram and Facebook using the hashtag for the wedding. But this time around I had Snapbridge and the D500, so I shot more confidently and was able to produce and share better results without any extra lag.

I love how far smartphone cameras have come, but I’m still a big believer in carrying around a more capable camera. Until now that decision has involved a tradeoff: you gain a significant boost in quality at the cost of instant gratification. Snapbridge is the kind of feature that helps break down all the steps that separate those two sides of the equation. With it, you really get the best of both worlds.

Snapbridge is one small part of the D500’s experience, which again, is a superb (and relatively expensive) camera. But Snapbridge is also quickly becoming a flagship feature of all of Nikon’s new cameras — something that’s made me, a lifelong Canon shooter, consider jumping ship. The convenience of having a camera on your smartphone — especially one that’s as good as what you find on the iPhone 7, Google Pixel, and Galaxy S7 Edge — is hard to beat. But Snapbridge, and the inevitable copycat ideas that will follow, has a chance to shift the power back to standalone cameras.

Source http://www.theverge.com

web-design-tools

10 Hottest Design Tools You Must Try In 2016

A recent design tools survey conducted by Khoi Vinh, one of Fast Company’s “fifty most influential designers in America”, shows that Photoshop is slowly losing its popularity among designers.

Answers from over 4,000 participants hailing from almost 200 countries prove that designers are open to new tools that ease the process of conceptualizing, wireframing, prototyping and designing digital products.

Let’s take a look at some of the hottest design tools you must try in 2016.




Atomic

Atomic is an interface design software for professionals. Image credit: Atomic.

Atomic is an interface design software for professionals. Image credit: Atomic.

Atomic is a handy tool for designing interactive prototypes across different devices. Simply design in your browser, on Mac or PC, and view on any device.




Ceros

Ceros is an interactive content marketing software. Image credit: Ceros.

Image credit: Ceros.

Ceros is a powerful content creation software for marketers & designers. You can easily create engaging interactive content such as infographics, ebooks, microsites, magazines, banners and more.




ProtoSketch

Powerful yet simple vector graphics editor for iPad. Image credit: ProtoSketch.

Powerful yet simple vector graphics editor for iPad. Image credit: ProtoSketch.

ProtoSketch claims to be a desktop-class graphic design software for iPad. It is easy to create anything from a logo to web design. A great tool to try for prototyping when traveling.

Floid

Floid is an interaction design tool for any platform & device. Image credit: Floid.

Floid is an interaction design tool for any platform & device. Image credit: Floid.




Floid is a rapid prototyping software that allows you to design for any platform & device including the web, iOS and Android. Currently available only for Mac users.

Fuse

Fuse is the UX tool suite for app designers and developers. Image credit: Fuse.

Fuse is the UX tool suite for app designers and developers. Image credit: Fuse.

Fuse is the UX tool suite for app designers and developer. It allows you to create and update the look and feel for native apps in real-time on multiple devices simultaneously. Currently available for OS X and Windows users.

Vectr

Vectr is a free graphics editor. Image credit: Vectr.

Vectr is a free graphics editor. Image credit: Vectr.




Vectr is a free graphics editor available as a web or Mac app. Vectr has a simple and intuitive interface, live exports and real-time sharing across various devices.

Picktorial

Picktorial is an upcoming professional-quality, smooth and intuitive photo editing software for the Mac. Image credit: Picktorial.

Picktorial is an upcoming professional-quality, smooth and intuitive photo editing software for the Mac. Image credit: Picktorial.

Picktorial is a promising looking professional-quality, smooth and intuitive photo editing software for the Mac. Some of the announced features include live editing, seamless RAW conversion and one window workspace just to name a few. You can sing up to join the beta.




Figma

Figma is the collaborative interface design tool. Image credit: Figma.

Figma is the collaborative interface design tool. Image credit: Figma.

Figma is a revolutionary cloud-based software that allows you to collaborate on interface design projects from the idea to the ready-to-ship product. You can sign up to reserve your spot for the preview release.

UXPin

UXPin announced to be working on the complete redesign of the tool that looks very promising. Image credit: UXPin.

UXPin announced to be working on the complete redesign of the tool that looks very promising. Image credit: UXPin.




UXPin is one of the most popular UX design and wireframing tools used by thousands of designers around the globe. However, UXPin announced to be working on the complete redesign of the tool that looks very promising. You can join the waiting list to get notified about the release.

Gravit

Gravit is a web-based design and collaboration platform. Image credit: Gravit.

Gravit is a web-based design and collaboration platform. Image credit: Gravit.




Gravit is a powerful web-based design and collaboration platform that runs right in your browser. Design, prototype and collaborate, all inside one app. The best part about Gravit that it’s completely free to use.

What design tool do you use?

What do you think of all these promising design tools I’ve listed above? Are you still using Photoshop for every design project you’re working on?

Source http://www.forbes.com

www-gifcreator-me_ljpfzi

ZTE’s crowdsourced smartphone is going to be an ‘eye tracking, self-adhesive phone’

www-gifcreator-me_ljpfziAfter announcing its plans to crowdsource a smartphone, collecting user ideas, and letting people vote on the designs, ZTE has announced that the user-submitted “Eye Tracking, Self-Adhesive Phone” concept has won the Project CSX contest with over 36 percent of the votes.


The winning design (which is described in full on ZTE’s forum) features a pair of cameras on the top and bottom bezels of the front of the phone for eye-tracking support, a split-screen function that displays different images at different angles for enhanced security. It also includes a self-adhesive backing for the rear of the phone to stick it to things and provide extra stability for the eye-tracking system. The designers hope for the eye-tracking system to allow automatic scrolling of web pages or books while you read them or to skip through a video while you watch.




ZTE is beginning product development of the winning design, and hopes to launch the final device sometime in 2017. The crowdsourced nature of the device won’t end here, however, with ZTE planning on continuing to turn to the community for deciding things like the name, color, and materials of the Project CSX device.

Source http://www.theverge.com

real-slimmmy[1]

[Infographic] Difference between HTML vs CSS?

HTML vs CSS Differences

 

html“HTML is a markup language for describing web documents (web pages).” – w3schools

In 1989, Tim Berners-Lee invented the Web with HTML as its publishing language. HTML (Hyper Text Markup Language) was created to help programmers describe the content on a website like <this is a heading>, <this is a paragraph>. HTML uses tags to help you add paragraphs, headers, pictures, bullets and other pieces of structure. Just like you would write something on a word document, HTML helps you write something on a website. (Wiki, w3schools)




 CSS“CSS describes how HTML elements are to be displayed on screen, paper, or in other media.” – w3schools

CSS was first proposed by Hakom Lie and co-created by Bert Bos around 1996. Created to compliment HTML, CSS (CascadingStyle Sheets) is what makes a website look and feel amazing. Presentation and ease of use have been some of the qualities CSS has brought to web development. It is more involved with changing a websites style rather than its content. Kind of like changing the font size, font color and positioning on a word document. CSS is in charge of the way the content looks on a page and what else goes on it to compliment that content.  (Wiki, w3schools)




Check out the below infographic for a deeper breakdown on each!
CSS vs HTML infographic




Original source is Codingdojo

www-gifcreator-me_9szvx5

Xiaomi Made A Bendable Touch Screen

Lenovo, Samsung, LG, and Xiaomi are all reportedly working on bringing bendable phone screens to the public.www-gifcreator-me_9szvx5 We’ve seen some of these prototypes in-person, as well as in leaks online, and today we’re getting a look at Xiaomi’s idea for a bendable touchscreen. A 30-second video put online this past week seems to suggest Xiaomi created a real, tangible bendable phone IRL that also responds to touch. We don’t see the user bend it in multiple directions but it does seem to be bent in the person’s hand. We don’t have any details about a release or the phone itself.




Bloomberg reported earlier this year that Samsung might release two smartphones with bendable OLED screens in 2017. One model is said to fold in half, while another has a 5-inch display that unfurls into a tablet-sized 8-inch panel. Maybe soon we’ll have all the options when it comes to bendable screens!

VIA: GizmoChina
SOURCE: Youku.com
http://www.theverge.com/circuitbreaker/2016/10/17/13304588/xiaomi-bendable-screen-phone

30 Best HTML5 Tools for Designers and Developers 2016

Create better websites this year with our 30 Best HTML5 Tools for Designers and Developers 2016 list. Here, WebDesignMoo searched far and wide to bring you the best HTML5 tools to help you save time and be more productive when creating your websites, here are the top.




HTML5 and HTML5 tools has, undoubtedly, made web design and development faster and easier than ever before. Gone are the days when you have to code everything from scratch. HTML5 has made web development easier to understand and HTML5 tools have given websites more versatility and functionality. We have listed 30 of the best HTML5 tools around for designers and developers.

Ink

30 Best HTML5 Tools for Designers & Developers 2016

INK allows you to create highly responsive HTML emails. Their CSS frameworks makes it possible to create emails that can work on any device or client.

Framework 7

30 Best HTML5 Tools for Designers & Developers 2016

Framework 7 is a free and open source HTML5 framework that allows you to build phonegap or web apps with the feel and feel of native Android or iOS apps.


Purple Composer

30 Best HTML5 Tools for Designers & Developers 2016

Formerly known as Purple Animate, this tool for Mac allows you to build small, simple, yet effective HTML 5 animations.

Tumult Hype

30 Best HTML5 Tools for Designers & Developers 2016

This tool allows you to create interactive content and animation that can run on different devices, no coding experience necessary.

Create JS

30 Best HTML5 Tools for Designers & Developers 2016




Create JS is a Javascript library that works with the HTML5 Canvas element to make graphic creation faster.

Radi

30 Best HTML5 Tools for Designers & Developers 2016

Radi app is a graphic creation, video production, and web animation tool created specifically for HTML 5.

JS Capture

30 Best HTML5 Tools for Designers & Developers 2016

A screen capturing library that allows you to make screenshots and record video directly from your browser.

Animatron

30 Best HTML5 Tools for Designers & Developers 2016

Animatron’s intuitive editor makes it easy to design and create interactive content and animations, all without coding.

Mixeek

30 Best HTML5 Tools for Designers & Developers 2016

A free HTML 5 and CSS online tool that helps users design and create web animations.

Crosswalk

30 Best HTML5 Tools for Designers & Developers 2016

The Crosswalk Project allows web developers to create phonegap apps with the full features and feel of native apps.

HTML 5 Test

30 Best HTML5 Tools for Designers & Developers 2016

A free tool that test how well your browser supports HTML 5.

PuzzleScript

30 Best HTML5 Tools for Designers & Developers 2016

Create simple games for your website quickly with this game engine.

Sencha Space

30 Best HTML5 Tools for Designers & Developers 2016

Used by developers to secure and manage HTML5 and Javascript applications to make app development simpler, more secure, and easier to deploy.

Mercury Editor

30 Best HTML5 Tools for Designers & Developers 2016

This open source HTML5 editor also supports CSS and Javascript, plus it allows developers to track and report problems.

Initializr

30 Best HTML5 Tools for Designers & Developers 2016

A HTML5 template generator that creates clean, customizable tempates.

Maqetta

30 Best HTML5 Tools for Designers & Developers 2016

Maqetta is a free, browser based tool that provides WYSIWYG visual authoring for HTML user interfaces.

Dojo Toolkit

30 Best HTML5 Tools for Designers & Developers 2016

AJavascript toolkit that provides everything you need to create a web app link language utilities, UI components and many more.

FontDragr

30 Best HTML5 Tools for Designers & Developers 2016

Test custom fonts without coding or uploading, just drag and drop.

CSS3 Patterns Library

30 Best HTML5 Tools for Designers & Developers 2016

With over 40 designs that are fully compatible with modern browsers, no need to use js patterns or images.

Create.js

30 Best HTML5 Tools for Designers & Developers 2016

Web editing interface for content management systems, designed to fully browser based HTML5 environment for managing content.

Mugeda

30 Best HTML5 Tools for Designers & Developers 2016

A powerful studio tool for creating high quality, professional web animation that supported on all devices.

HTML 5 Maker

30 Best HTML5 Tools for Designers & Developers 2016

Create banners and slides with this free animation tool.

Molecule

30 Best HTML5 Tools for Designers & Developers 2016

Molecule allows you to build HTML 5 cross platform games quickly and easily with its simple yet powerful framework.

Mozilla Browser Quest

30 Best HTML5 Tools for Designers & Developers 2016

Create games by playing games. It’s game like interface makes programming apps easy and fun.

Hippo Studios

30 Best HTML5 Tools for Designers & Developers 2016

Whether you’re building games, making presentations or animations, this platform can do it all and more.

Dreamweaver

30 Best HTML5 Tools for Designers & Developers 2016

Adobe’s updates on Dreamweaver has made it faster, more powerful, and even easier to use with live editing and guides.

Sublime Text

30 Best HTML5 Tools for Designers & Developers 2016

Code text editor with slick interface and powerful features like split editing and multiple selections.

Less Framework

30 Best HTML5 Tools for Designers & Developers 2016

Have one less thing to worry when creating adaptive websites about with this CSS grid system.

HTML 5 Kickstart

30 Best HTML5 Tools for Designers & Developers 2016

This ultra-lean HTML 5, CSS and js framework helps build websites faster.

Open Designs

They have almost 8 million templates created using valid W3c compliant HTML and CSS.

30 Best HTML5 Tools for Designers & Developers 2016

Source http://webdesignmoo.com