Sponsored Content
Top Forums Shell Programming and Scripting How to determine if there's a file in directory! Post 302569893 by nikki1200 on Wednesday 2nd of November 2011 02:07:31 AM
Old 11-02-2011
How to determine if there's a file in directory!

Hi All,

I'm just wondering how can i determined if there's a file in directory and put it in a logs?
Code:
dir="/home/test/"

Please advise,
Thanks,

Moderator's Comments:
Mod Comment Use code tags, thanks.

Last edited by zaxxon; 11-02-2011 at 03:23 AM.. Reason: code change; zaxxon: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to determine if a file is ASCII?

I'm writing a script that takes a filename as an argument, which determines the "file type" of the file. I want to know if there is any command I can use to determine if a file is ASCII type, thanks all for giving a help. (11 Replies)
Discussion started by: popo
11 Replies

2. UNIX for Dummies Questions & Answers

determine the size of a file???

Hello, Can someone please tell me which command to use to determine the size of a file? When I log in to my shell account, I do this $>% ls -als total 632 8 -rw-r--r-- 1 user01 devgrp1 1558 Jul 30 23:25 .kshrc What is "1158"? Bytes? Kilobytes? I apologize if my... (8 Replies)
Discussion started by: alan
8 Replies

3. Shell Programming and Scripting

determine owner directory permissions from within the directory

From within a directory, how do I determine whether I have write permission for it. test -w pwd ; echo ? This doesn't work as it returns false, even though I have write permission. (4 Replies)
Discussion started by: Sniper Pixie
4 Replies

4. UNIX for Advanced & Expert Users

cannot determine current directory

Hi, when I execute some simple commands on my solaris system, I am getting the following warning message: Could anybody tell me what could be the reason Ex:- If I give the command, which ls Warning: cannot determine current directory ... (15 Replies)
Discussion started by: axes
15 Replies

5. UNIX for Dummies Questions & Answers

How Can I Easily Determine If A File Has been Added to a Directory

I am uploading files that need to be processed prior to uploading. I will put the files in a directory. My question is how can I write an easy process to kick off a script once a file has been added? Is there an easy way to determine if a file has been added to a directory? Thanks (1 Reply)
Discussion started by: goodmis
1 Replies

6. UNIX for Advanced & Expert Users

How Can I Easily Determine If A File Has been Added to a Directory

I am uploading files that need to be processed prior to uploading. I will put the files in a directory. My question is how can I write an easy process to kick off a script once a file has been added? Is there an easy way to determine if a file has been added to a directory? Thanks (7 Replies)
Discussion started by: goodmis
7 Replies

7. Shell Programming and Scripting

determine owner of a file

Hello, I am on a mission to determine the user of file. I have used the ls -l command but it displays permission, link, user, group, etc, but I just want to display just the name of user of a specified file. Many thanks (4 Replies)
Discussion started by: unibboy
4 Replies

8. UNIX for Advanced & Expert Users

How to determine if a file is done copying

I have a file repository in a directory where files are copied into it by ftp or samba. Some of the ftp transfers can be slow, and some of the files can be fairly large. The files are not being used for anything in this directory other than being taken out of the directory and used by the... (2 Replies)
Discussion started by: husker_ricky
2 Replies

9. Shell Programming and Scripting

[Perl] Determine directory name

Hi there, I wonder if it is possible the determine a name of a directory which is different on various hosts. Let me try to explain. I have the directory /tmp/dir1/dir2/canchangedir. This directory name is different on various hosts. I need to use the directory name, independent from the... (2 Replies)
Discussion started by: ejdv
2 Replies

10. Shell Programming and Scripting

Determine BL and RL of a file

A regular ebcdic mainframe tape usually contains header information the 1st three blocks of the tape. The header information tells the computer/user more information about what is on tape. The header info is 240 bytes in length at 80 bytes each header. The 1st block/header is volume name or... (1 Reply)
Discussion started by: Linux-wannabe
1 Replies
SUPYBOT-PLUGIN-DOC(1)					      General Commands Manual					     SUPYBOT-PLUGIN-DOC(1)

NAME
supybot-plugin-doc - Generates the documentation for a Supybot plugin SYNOPSIS
supybot-plugin-doc [options] DESCRIPTION
supybot-plugin-doc is used to generate documentation (StructuredText or reStructuredText format) for a supybot(1) plugin. OPTIONS
--version Show version of program. -h, --help Show summary of options. -c, --clean Clean the various data/conf/log directories after generating the docs. -o, --output-dir=OUTPUTDIR Specifies the directory in which to write the documentation for the plugin. -f, --format=FORMAT Specifies which output format to use. Choices are 'rst' or 'stx'. --plugins-dir=PLUGINSDIRS Looks in the given directory for plugins and generates documentation for all of them. SEE ALSO
python(1), supybot(1), supybot-test(1), supybot-botchk(1), supybot-wizard(1), supybot-adduser(1), supybot-plugin-create(1) AUTHOR
This manual page was originally written by James Vega <jamessan at supybot dot com>. Permission is granted to copy, distribute and/or mod- ify this document under the terms of the Supybot license, a BSD-style license. May 2009 SUPYBOT-PLUGIN-DOC(1)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy