Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Sunday, July 24, 2011

Basic Linux command for beginner

 File Commands:
1.    ls   -– directory listing (to see the content of folder)
2.    ls -al   -– formatted listing with hidden files
3.    cd dir  -– change directory to dir
4.    cd  -– change to home
5.    pwd  -– show current directory
6.    mkdir dir  -– create a directory dir
7.    rm file   -– delete file
8.    rm -r dir  -– delete directory dir
9.    rm -f dir  -– force remove file
10.  rm -rf dir  -– force remove directory dir
11.  cp file1 file2  -– copy file1 to file2
12.  cp -r dir1 dir2  -– copy dir1 to dir2; create dir2 if it doesn't exist
13.  mv file1 file2  –- rename or move file1 to file2
                                 if file2 is an existing directory, moves file1 into directory file2
14.   ln -s file link  –- create symbolic link link to file
15.   touch file  –- create or update file
16.   cat > file  -– places standard input into file
17.   more file  –- output the contents of file
18.   head file  –- output the first 10 lines of file
19.   tail file  –- output the last 10 lines of file
20.   tail -f file  -– output the contents of file as it

SEARCHING :
1.    grep pattern files  -– search for pattern in files
2.    grep -r pattern dir  -– search recursively for pattern in dir
3.    command | grep pattern  -– search for pattern in the output of command
4.    locate file  –- find all instances of file

NETWORK :
1.    ping host  –- ping host and output results
2.    whois domain  -– get who is information for domain
3.    dig domain  –- get DNS information for domain
4.    dig -x host  -– reverse lookup host
5.    wget file  –- download file
6.    wget -c file  -– continue a stopped download

SHORTCUTS :
1.    ctrl+c  –- halt the current command
2.    ctrl+z  –- stops the current command ,resume with fg in the foreground or bg
                         in the background.
3.    ctrl+d  –- logout of current session, similar to exit
4.    ctrl+w  –- erases one word in the current line
5.    ctrl+u  –- erases the whole line
6.    ctrl+r  –- type to bring up a recent command
7.    !!  –- repeats the last command
8.    exit  –- log out of current session

PROCESS MANAGEMENT :
1.    ps  –- display your currently active processes
2.    top  -– display all running processes
3.    killpid  -– kill process id pid
4.    killall proc  -– kill all processes named proc (use with extreme caution)
5.    bg  –- lists stopped or background jobs; resume a stopped job in the background
6.    fg  –- brings the most recent job to foreground
7.    fg n  -– brings job n to the foreground

SYSTEM INFO :
1.    date  -– show the current date and time
2.    cal  –- show this month's calendar
3.    uptime  –- show current uptime
4.    w  –- display who is online
5.    whoami  -– who you are logged in as
6.    finger user  -– display information about user
7.    uname -a  –- show kernel information
8.    cat /proc/cpuinfo  –- cpu information
9.    cat /proc/meminfo  -– memory information
10.  man command  -– show the manual for command
11.  df  –- show disk usage
12.  du –- show directory space usage
13.  free  -– show memory and swap usage
14.  whereis app  -– show possible location of app
15.  which app  –- show which app will bw run by default.

COMPRESSION :
1.    tar cf file.tar files  –- create a tar named file.tar containing files
2.    tar xf file.tar  –- extract the files from file.tar
3.    tar czf file.tar.gz files  -– create a tar with Gzip compression
4.    tar xzf file.tar.gz  –- extract a tar using Gzip
5.    tar cjf file.tar.bz2  –- create a tar with Bzip2
6.    gzip file  –- compresses file and renames it to file.gz
7.    gzip -d file.gz  –- decompresses file.gz back to file.
Remember Linux is case-sensitive.


For better understand see video:
basic linux command part 1

Sunday, April 10, 2011

Google’s Advance Search Query Syntaxes

[ intitle: ]
                   The “intitle:” syntax helps Google restrict the search results to pages containing that word in the title. For example, “intitle: login password” (without quotes) will return links to those pages that has the word "login" in their title, and the word "password" anywhere in the page.
                   Similarly, if one has to query for more than one word in the page title then in that case “allintitle:” can be used instead of “intitle” to get the list of pages containing all those words in its title. For example using “intitle: login intitle: password” is same as querying “allintitle: login password”.

[ inurl: ]
                The “inurl:” syntax restricts the search results to those URLs containing the search keyword. For example: “inurl: passwd” (without quotes) will return only links to those pages that have "passwd" in the URL.
               Similarly, if one has to query for more than one word in an URL then in that case “allinurl:” can be used instead of “inurl” to get the list of URLs containing all those search keywords in it.
 For example: “allinurl: etc/passwd“ will look for the URLs containing “etc” and “passwd”. The slash (“/”) between the words will be ignored by Google.

[ site: ]
                 The “site:” syntax restricts Google to query for certain keywords in a particular site or domain. For example: “exploits site:hackingspirits.com” (without quotes) will look for the keyword “exploits” in those pages present in all the links of the domain “hackingspirits.com”. There should not be any space between “site:” and the “domain name”.

[ filetype: ]
                 This “filetype:” syntax restricts Google search for files on internet with particular extensions (i.e. doc, pdf or ppt etc). For example: “filetype:doc site:gov confidential” (without quotes) will look for files with “.doc” extension in all government domains with “.gov” extension and containing the word “confidential” either in the pages or in the “.doc” file. i.e. the result will contain the links to all confidential word document files on the government sites.

[ link: ]
“link:” syntax will list down webpages that have links to the specified webpage. For Example:
“link:www.securityfocus.com” will list webpages that have links pointing to the SecurityFocus homepage.
Note there can be no space between the "link:" and the web page url.

[ related: ]
                  The “related:” will list web pages that are "similar" to a specified web page. For Example:
“related:www.securityfocus.com” will list web pages that are similar to the Securityfocus homepage. Notethere can be no space between the "related:" and the web page url.

[ cache: ]
                  The query “cache:” will show the version of the web page that Google has in its cache. For Example:“cache:www.hackingspirits.com” will show Google's cache of the Google homepage. Note there can beno space between the "cache:" and the web page url.
                 If you include other words in the query, Google will highlight those words within the cached document. For Example: “cache:www.hackingspirits.com guest” will show the cached content with the word "guest" highlighted.

[ intext: ]
                  The “intext:” syntax searches for words in a particular website. It ignores links or URLs and page titles.
For example: “intext:exploits” (without quotes) will return only links to those web pages that has the
search keyword "exploits" in its webpage.

[ phonebook: ]
                     “phonebook” searches for U.S. street address and phone number information. For Example: “phonebook:Lisa+CA” will list down all names of person having “Lisa” in their names and located in “California (CA)”. This can be used as a great tool for hackers incase someone want to do dig personal information for social engineering.

Wednesday, July 14, 2010

some useful shortcut for 'special symbols' in MSoffice


Character
Shortcut
A line break
Shift+Enter
A page break
Ctrl+Enter
A column break
Ctrl+Shift+Enter
An optional hyphen
Ctrl+- (hyphen)
A nonbreaking hyphen
Ctrl+Shift+- (hyphen)
A nonbreaking space
Ctrl+Shift+Spacebar
A copyright symbol
Alt+Ctrl+C
A registered trademark symbol
Alt+Ctrl+R
A trademark symbol
Alt+Ctrl+T
An ellipsis
Alt+Ctrl+. (period)
An em dash
Ctrl+Shift+\
An en dash
Ctrl+- (on numeric keypad)
The page number
Alt+Shift+P
The current date
Alt+Shift+D
The current time
Alt+Shift+T

Tuesday, April 20, 2010

SOME USEFUL WINDOW RUN COMMAND

  1. On screen keyboard --------osk
  2. fonts ------------------ ------- fonts
  3. game controller -------- joy.cpl
  4. internet properties ---- ---- inetcpl.cpl
  5. keyboard properties ----- --- control keyboard
  6. local user and groups ---- ---- lusrmgr.msc
  7. date/time properties ----- --- timedate.cpl
  8. disk cleanup properties --------Cleanmgr
  9. disk management -------- diskmgmt.msc
  10. calculator --------calc