Sponsored Content
Top Forums Shell Programming and Scripting Few Important doubts and questions..(Unix/Shell) Post 302241794 by shubhranshu on Tuesday 30th of September 2008 09:33:37 AM
Old 09-30-2008
Few Important doubts and questions..(Unix/Shell)

Hi All,

I have a few questions which I am unable to solve/answer.

Please help me with them:-
  1. Command in Unix to determine if a Host is connected to the internet ?
  2. If a parenet process is killed what happens to the child process?
  3. How do I print the first 10 lines of a file in the command line?
  4. How do I refer to arguments passed to a Shell Script?
  5. How do I search for a string in a directory with subdirectories recursed?
  6. How do I view the contents of a very large error file?
  7. What is the command to list files in a directory in decreasing order of file size?
  8. What is the shell command to find all the Java files in a nested directory structure?
  9. What is the difference between SLEEP and WAIT?
Thanks in advance for your help and time.

Regards,
Shubh.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

unix & C doubts

Hi, I have a few doubt here : 1) I want to run a 3 different 'C' programs in same session simulteneously (parelelly). if I make a shell, it is running one after another, I mean it shout run in 3 processors. 2) In 'C' program, how can I assing a value of the unix commant cat a.txt|wc... (1 Reply)
Discussion started by: krishna
1 Replies

2. Solaris

Unix Administration doubts ********

Hi, Can anyone tell me the correct answers for these: 1. You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance? 2. How do you increase the OS limitation for open files (LINUX and/or Solaris)? Thanks:p (1 Reply)
Discussion started by: dreams5617
1 Replies

3. UNIX for Dummies Questions & Answers

Unix doubts

Hello All, I am very new to UNIX. Please help me to find answers of below questions. 1.A script is saved with name ls. When we execute the script what it will execute? a) Will execute ls command b) Will execute the script c) Will execute script or command depends on the path ... (2 Replies)
Discussion started by: aswathy
2 Replies

4. Forum Support Area for Unregistered Users & Account Problems

How to post a new thread (Regarding Unix related doubts) in Unix Forums

How to post a new thread (Regarding Unix related doubts) in Unix Forums. I registered my id but I am unable to post my Questions to Forum. Thanks & Regards, indusri (1 Reply)
Discussion started by: indusri
1 Replies

5. UNIX for Dummies Questions & Answers

unix doubts

Write unix command to list or view auto links (0 Replies)
Discussion started by: ashishshah.engg
0 Replies

6. UNIX for Dummies Questions & Answers

Unix doubts

Hi All, 1. how and who calls .profile when you login 2. what is PPID and what means by PPID = 0 Thanks in Advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

7. Shell Programming and Scripting

awk, sed and a shell doubts

Hi, I have 3 doubts which I posted it here. Doubt 1: I have a file containing data: 22 -73 89 10 99 21 15 -77 23 63 -80 91 -22 65 28 97 I am trying to print the fields in the reverse order and replace every field by its absolute (positive) value (ie.) I am looking for output: 10... (8 Replies)
Discussion started by: royalibrahim
8 Replies

8. Shell Programming and Scripting

shell scripting doubts

Hello All, I am working in a reputed software firm,currently working on testing platform (manual and automation).But I am very much intersted in unix and shell scripting,I feel that I am good at beginner level of shell scripting,still I want to practise shell scripting to become excel in it.I... (1 Reply)
Discussion started by: maheshglm
1 Replies

9. Solaris

Unix scripting doubts

i hav a file like this -rwxr-xr-x 1 root controlm 4141 Nov 13 2006 /opt/scripts/prod/fvaauditlos.ksh -rwxr-xr-x 1 root controlm 3958 Nov 13 2006 /opt/scripts/prod/fvaexpchbk1.ksh -rwxr-xr-x 1 root controlm 6471 Nov 13 2006 /opt/scripts/prod/fvaexpchbk2.ksh... (24 Replies)
Discussion started by: p_satyambabu
24 Replies

10. Shell Programming and Scripting

Shell script doubts

Hello please kindly solve these doubts i have about the following scripts Script 1 //Shell script that accepts arguments and prints them in reverse order// echo "number of arguments" len=$#; while do eval echo \$$len len=`expr $len - 1` done --------- Output $sh test.sh a... (3 Replies)
Discussion started by: Shynash21
3 Replies
packingrules(4) 						   File Formats 						   packingrules(4)

NAME
packingrules - packing rules file for cachefs and filesync SYNOPSIS
$HOME/.packingrules DESCRIPTION
$HOME/.packingrules is a packing rules file for filesync and cachefspack. $HOME/.packingrules contains a list of directories and files that are to be packed and synchronized. It also contains a list of directories and files that are to be specifically excluded from pack- ing and synchronization. See filesync(1) and cachefspack(1M). The $HOME/.packingrules file is automatically created if users invoke filesync with filename arguments. By using filesync options, users can augment the packing rules in $HOME/.packingrules. Many users choose to manually create the packing rules file and edit it by hand. Users can edit $HOME/.packingrules (using any editor) to permanently change the $HOME/.packingrules file, or to gain access to more powerful options that are not available from the command line (such as IGNORE commands). It is much easier to enter complex wildcard expressions by editing the $HOME/.packingrules file. Blank lines and lines that begin with a pound sign (`#') are ignored. Any line can be continued by placing a backslash (`') immediately before the NEWLINE. All other lines in the $HOME/.packingrules file have one of the following formats: PACKINGRULES major. minor. This line is not actually required, but it should be the first line of every packing rules file. This line identifies the packing rules file for the file(1) command and specifies a format version number. The current version number is 1.1. See file(1). BASE directory-1 [directory-2] This line identifies a directory (or pair of directories) under which files should be packed and synchro- nized. At least one directory name must be specified. For rules that are to be used by filesync a second directory name (where the copies are to be kept) must also be specified. The arguments must be fully quali- fied path names, and may include environment variables. LIST name ... This line enumerates a list of files and sub-directories (beneath the current BASE) that are to be kept synchronized. This specification is recursive, in that specifying the name of a directory automatically includes all files and subdirectories it contains. Regular expressions (as described in glob and gmatch) are permitted. See glob(1) and gmatch(3GEN). IGNORE name ... This line enumerates a list of files that are not to be kept synchronized. Regular expressions (using glob and gmatch) are permitted. There are important differences between the arguments to LIST and IGNORE statements. The arguments to a LIST statement can contain slashes and are interpreted as file names relative to the BASE directories. The arguments to an IGNORE statement are simpler names or expressions that cannot contain slashes. An IGNORE statement will not override a LIST statement. IGNORE statements only exclude files that are found beneath LISTed directories. If the first name argument to a LIST statement begins with an exclamation point (`!'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The output of the command will be treated as a list of newline separated file names to be packed/synchronized. The resulting file names will be interpreted relative to the enclosing BASE directory. If the first name argument to an IGNORE statement begins with an exclamation point (`!'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The command will be expected to figure out which names should not be synchronized. The output of the command will be treated as a list of newline separated file names that should be excluded from the packing and synchronization list. Commands will be broken into distinct arguments and run directly with sh -c. Blanks can be embedded in an argument by escaping them with a backslash (`') or enclosing the argument in double quotes (` " '). Double quotes can be passed in arguments by escaping the double quotes with a backslash (`'). LIST lines only apply to the BASE statement that precedes them. IGNORE lines can appear before any BASE statement (in which case they apply to all BASEs) or after a BASE statement (in which case they only apply to the BASE that precedes them). Any number of these statements can occur in any combination. The order is not important. EXAMPLES
Example 1: A sample $HOME.packingrules file. The use of these statements is illustrated in the following $HOME.packingrules file. # # junk files, not worth copying # IGNORE core *.o *.bak *% # # most of the stuff I want to keep in sync is in my $HOME # BASE /net/bigserver/export/home/myname $HOME # everything in my work sub-directory should be maintained LIST work # a few of my favorite mail boxes should be replicated LIST m/incoming LIST m/action LIST m/pending # # I like to carry around a couple of project directories # but skip all the postscript output # BASE /net/bigserver/export/projects $HOME/projects LIST poindexter epiphany IGNORE *.ps # # the foonly package should always be kept on every machine # BASE /net/bigserver/opt/foonly /opt/foonly LIST !cat .packinglist # # and the latest executables for the standard build environment # BASE /net/bigserver/export/buildenv $HOME/buildenv LIST !find . -type f -a -perm -111 -a -print SEE ALSO
file(1), filesync(1), cachefspack(1M) SunOS 5.10 23 Dec 1996 packingrules(4)
All times are GMT -4. The time now is 09:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy