say i would like to check if the file is existed before i use rm command. How can i do it?
i know if i can use find, but i would like to have a good interface (in a shell script)
thks (3 Replies)
I have the below script to check whether directory is exist or not , now I sure the directory /abc NOT exist , but when run the script , it still pop the result is "the directory exist" , could suggest what is wrong ? thx
ll -d /abc > /dev/null 2>&1
if
then
echo "the directory exist !!"
... (7 Replies)
Hi
Does anybody know how I can check if a file exists
i.e. see bellow, this doesn't work by the way and if tried countless variations on this
file1=$one/file111.txt
if
then
echo "Present"
else
echo "Not present"
fi
result :
Not present
(file is already present, eventhough its... (3 Replies)
Hi ,
I need a script which basically deltes all files in folder a which are alreasy present in folder b
say folder a has files abc.txt
pqr .txt
and b has abc.txt
pqr.txt
rmr.txt
then file abc.txt and pqr.txt from a should be deleted (6 Replies)
Hi,
I am trying to create a bash script which will check if file exist then remove that file else do nothing. I have to do same process for three files in same script. I have written code for one file and trying to run it.
if
then
rm -r /user1/abc/File1
fi
When I run this code it... (1 Reply)
Hi,
I created following script to check if file exist:
#!/bin/bash
SrcDir=$1
SrcFileName=$2
SrcTimePeriod=$3
if ;then
echo 1
else
echo 0
fi
I ran it like: /apps/Scripts/FileExist.sh /apps/Inbox file1 2nd_period_2010
Even file exist at that location, my above command is... (4 Replies)
Hello
Im trying to build a script that (among other stuff) checks each line in a file for the $4 "variabel" and if there are a folder in the directory that has that not has the same name as that it create a folder, otherwise it wont do anything. I guess i could just send the errors to /dev/null,... (2 Replies)
Hi guys,
I am new to shell script, i want to write shell script, the script details has mentioned below
Two files are to be check in one particular directory, if the file exist in particular folder then the file is existed and also if the file exist more than three hours then send... (2 Replies)
Hi All,
Seeking for your assistance to compare if the file in working directory is found on the DIR2 directory and if not found move the file in DIR2.
ex. WORKING_DIR=/home/dir1/
file1.txt
DIR2=/home/admin/users
file1.txt
what i did was
found_nonempty=''
for file in... (4 Replies)
Hi All,
Whenever i get 10 files(file names like sales*) then another file need to create.
May i know how to implement this in KSH. (4 Replies)
Discussion started by: siddireddy
4 Replies
LEARN ABOUT DEBIAN
dwww-convert
DWWW-CONVERT(8) Debian DWWW-CONVERT(8)NAME
dwww-convert - convert files to HTML for dwww
SYNOPSIS
dwww-convert [--no-path-info] type location
DESCRIPTION
dwww-convert is part of the dwww package, which provides access to on-line documentation on a Debian system via WWW. dwww-convert converts
documentation to HTML so that it can be viewed with a WWW browser. dwww-convert is usually run by the WWW server, but can also be run by
hand.
The type argument gives the type of the file, one of:
file An arbitrary file; the type is guessed using simple heuristics based on the filename.
dir A directory. If the directory contains the file index.html or index.htm that file will be returned. Otherwise, A listing of the
files in the directory is generated.
html An HTML file. The file is returned as is.
man A manual page. The location is the pathname of the nroff source file.
runman A manual page. The location is the name of the manual page and its section, separated by a slash. For example, the location would
be intro/1 to refer to the intro(1) manual page.
info An Info file.
text A plain text file (using the ISO-8859-1 character set).
An unknown file type is treated as text.
The location argument gives the filename of the file. The name must be complete, i.e., it must start at the root directory (/). The name
must not contain any symbolic links (cf. realpath(1)). The file must be located in or below a directory that has been allowed by the sys-
tem administrator; see dwww(7) for more info.
The file may be compressed with gzip(1) or bzip2(1). It is uncompressed automatically and invisibly. Compression is indicated by a file-
name that ends in `.gz' or `.bz2'.
OPTIONS --no-path-info
Internal option used by the dwww's CGI script to let dwww-convert know, that the arguments following the option do not come from the
PATH_INFO variable, but from the QUERY_STRING.
FILES
/etc/dwww/dwww.conf
Configuration file for dwww. See dwww(7) for more information.
SEE ALSO dwww(7), dwww-txt2html(8), dwww-build(8), dwww-cache(8).
AUTHOR
Lars Wirzenius. Modified by Robert Luberda.
See dwww(7) for copyrights and stuff.
dwww 1.11.1 February 15th, 2009 DWWW-CONVERT(8)