-s option stands for ? *Urgent


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting -s option stands for ? *Urgent
# 1  
Old 02-06-2009
-s option stands for ? *Urgent

if [[ -s $FTPFILE ]]


in the above command, i want to know what exactly -s options stands for, more detailed help is most welcomed, thanks in advance,
and $FTPFILE is a variable, wchich contains some filename,

pls..help asap.

thanks in advace,
regards
Kunal
# 2  
Old 02-06-2009
Kunal,

For filenames the options are:

-r true if it exists and is readable
-w
true if it exists and is writable
-x
true if it exists and is executable
-f
true if it exists and is a regular file (or for csh, exists and is not a directory)
-d
true if it exists and is a directory
-h
or -L true if it exists and is a symbolic link
-c
true if it exists and is a character special file (i.e. the special device is accessed
one character at a time)
-b
true if it exists and is a block special file (i.e. the device is accessed in blocks
of data)
-p
true if it exists and is a named pipe (fifo)
-u
true if it exists and is setuid (i.e. has the set-user-id bit set, s or S in the third
bit)
-g
true if it exists and is setgid (i.e. has the set-group-id bit set, s or S in the sixth
bit)
-k
true if it exists and the sticky bit is set (a t in bit 9)
-s true if it exists and is greater than zero in size

HTH, Smilie

Regards,

Praveen
# 3  
Old 02-06-2009
Thanks a lot, Praveen...!!!

from where did u fetch this...link please..

thanks again....
# 4  
Old 02-06-2009
Quote:
Originally Posted by niceboykunal123
Thanks a lot, Praveen...!!!

from where did u fetch this...link please..

thanks again....
Check up the man pages of test i.e. man test
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python setup.py install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies

3. UNIX for Dummies Questions & Answers

what does -e stands for

Below is a part of a script - if I know -eq means equals in a n if statement but what does this -e means here ? Please help. Thanks (2 Replies)
Discussion started by: csrohit
2 Replies

4. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

5. Red Hat

In ypserv what yp stands for?

Hi can any one please tell what yp stands for in ypserv daemon (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

6. Shell Programming and Scripting

"cc +DS1.1 +DA1.1" what does this option stands for?

Hi all cc +DA1.1 +DS1.1 -o /tmp/testapis /tmp/file.c While compiling the temp.c file i encounter the above line in my shell script. I would like to know what the options +DA1.1 and +DS1.1 is used for. After googling i found that we need to use it on PA RISC machines but a more detailed... (0 Replies)
Discussion started by: gurubarancse
0 Replies

7. UNIX for Dummies Questions & Answers

Urgent -Please help me 'mail' option not working

Hi , I have already posted a post regarding this, but i didn't get my problem solve, so some body help me as it was urgent for me, my mail option is not working, when i send a mail, it is strucking in /var/spool/mqueue folder. and i am getting struck there itself, i see below two files are... (1 Reply)
Discussion started by: mars_girish9
1 Replies

8. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

9. UNIX for Dummies Questions & Answers

file extension stands for mksys?

hi, what does this mksys stands for in unix? seems like its something to do with the os. i am using aix (1 Reply)
Discussion started by: yls177
1 Replies
Login or Register to Ask a Question