How to pass arguments in shell script?

you can pass arguments in shell script and refer them as $1 $2 etc

How to execute a .bat file in cygwin?

You can call a batch file directly in cygwin as below

sh pdf.bat

 

You can pass arguments as well.

How to execute a .bat file in cygwin?

How to call bat file in cygwin?

What is GREP command?

GREP is a command-line text-search utility originally written for Unix. The grep command searches files or standard input globally for lines matching a given regular expression, and prints the lines to the program’s standard output

How to search a file in linux/unix?

Find

find / -name game

Looks for a file named “game” starting at the root directory (searching all directories including mounted filesystems). The `-name’ option makes the search case sensitive. You can use the `-iname’ option to find something regardless of case.

find /home -user joe

Find every file under the directory /home owned by the user joe.

find /usr -name *stat

Find every file under the directory /usr ending in “stat”.

How do you tell the amount of free disk space left on a volume?

Df or df -h for human readable format

Give an example of set of shell commands that will give you the number of files in a directory ?

ls | wc -w or ls -l | wc -l

How you can see permission attribute for file?

ls -l

How do you list files in Linux?

ls

How to call a shell script on command prompt?

sh xyz.sh

What is the difference among “dropping a table”, “truncating a table” and “deleting all records” from a table?

  • Dropping:  (Table structure + Data are deleted), Invalidates the dependent objects, Drops the indexes
  • Truncating:  (Data alone deleted), Performs an automatic commit, faster than delete. He operation cannot be rolled back and no triggers will be fired.
  • Delete: (Data alone deleted), doesn’t perform automatic commit. We can put where clause
Next Page »