Posts

Showing posts from 2013

Finding files in linux

find / -name " filename "   Find the file called "filename" on your filesystem starting the search from the root directory "/". The "filename" may contain wildcards (*,?). The find command is very powerful. It has many options that will let you search for files in a variety of ways e.g., by date, size, permissions, owner, .... Yet some search queries can take you more than a minute to compose. See info find . Here are some more complex examples for using find to accomplish some useful tasks.

Viewing and editing files in Linux

cat filename | more   View the content of a text file called "filename", one page a time. The "|" is the "pipe" symbol (on many American keyboards it shares the key with "\"). more makes the output stop after each screenful. For long files, it is sometimes convenient to use the commands head and tail that display just the beginning and the end of the file, or less that enables scrolling up and down. If you happened to use cat a binary file and your terminal displays funny characters afterwards, you can restore it with the command reset .

Linux File management

cp source destination Copy files. E.g., cp /home/stan/existing_file_name . will copy a file to my current working directory. Use the "-R" option (stands for "recursive") to copy the contents of whole directory trees, e.g. , cp -R my_existing_dir/ ~ will copy a subdirectory under my current working directory to my home directory. mcopy source destination Copy a file from/to a DOS filesystem (no mounting of the DOS filesystem is necessary). E.g., mcopy a:\autoexec.bat ~/junk . See man mtools for other commands that can access DOS files without mounting: mdir , mcd , mren , mmove , mdel , mmd , mrd , mformat .... We don't use the mtool commands that often--

Linux Basic Operation

ls dir   List the contents of the current directory. The command dir is an alias to ls so these two commands do exactly the same thing. The file listing is normally color-coded: dark blue= directories, light grey = regular files, green = executable files, magenta = graphics files, red = compressed (zipped) files, light blue = symbolic links, yellow = device files, brown = FIFO ("First-In First-Out" named pipes).

Convert 2G Speed Into 3G

Image
મોદી સરકારના ‘મેક ઈન ઈન્ડિયા’ અભિયાન પછી ‘ડિજિટલ ઈન્ડિયા’ લોકો માટે ખૂબ જ મહત્વાકાંક્ષી અભિયાન બન્યું છે. ભારતના દોઢ લાખ ગામોને ઇન્ટરનેટથી જોડવાનો અને સરકારી યોજનાઓને ગામે ગામે પહોંચાડવાનો લક્ષ્ય છે.

Linux Help-Commands

any_command --help |more   Display a brief help on a command (works with most commands). For example, try cp --help |more . "--help" works similar to DOS "/h" switch. The "more" pipe is needed when the output is longer than one screen.    man topic Display the contents of the system manual pages (help) on the topic. Press "q" to quit the viewer. Try man man if you need any advanced options. The command info topic works similar to man topic , yet it may contain more up-to-date information. Manual pages can be hard to read--they were written for UNIX programmers. Try any_command --help for a brief, easier to digest help on a

Linux Shortcuts

Some additional KDE keyboard shortcuts (useful, but non-essential)  <Alt><Tab> Walk through windows. To walk backwards: <Alt><Shift><Tab> <Ctrl><Tab> Walk through desktops. To walks backwards: <Ctrl><Shift><Tab> <Ctrl><Esc> Show the table of processes running on my system. Allow me to kill any of the processes I

Linux Commands

<Ctrl><Alt><F1> Switch to the first text terminals. Under Linux you can have several (6 in standard setup) terminals opened at the same time. This is a keyboard shortcut, which means: "press the control key and the alt key, hold them. Now press <F1>. Release all keys."  

Reset Linux root password

So there it goes - Linux is a secure OS. No, really it is. Despite the title of this post, Linux is actually a secure system. Before we proceed to the main topic, let us consider a few points:  Linux is flexible to a very large extent.  Linux's administrator account is called 'root'. Linux systems never deny access to any resource whatsoever to the root account. If there are any restrictions in place, the root can remove those as well. The root account can set and change the password of any user. To change the password of root, you need to first login as root!