10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone, I am new to shell scripting.Please help.
I have list of files under some path /opt/thomas/
FileNames : 1.txt,2.txt,3.txt
I would like to check if these three files exists and not empty,continue with the script or else write error message file not found or file empty
Thanks (2 Replies)
Discussion started by: thomas9192
2 Replies
2. UNIX for Beginners Questions & Answers
Hello, sorry to bother anyone reading this
I have an assignment with a question that reads:
Your current directory is stenton. Create empty files called f1, f2, and f12 (in that order), within stenton
So my first thought was to enter: touch f1 f2 f12
but that does not work, does anyone... (1 Reply)
Discussion started by: eleuin
1 Replies
3. Shell Programming and Scripting
I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies
4. Shell Programming and Scripting
Hi,
I want to create EMPTY File through Shell Script but not using touch Command,
Please let me know any work around..
Thanks,
Samadhan (5 Replies)
Discussion started by: samadhanpatil
5 Replies
5. Shell Programming and Scripting
Hi,
Using the shell script, how can I empty the files that are under a dir.
-Siva (2 Replies)
Discussion started by: gsiva
2 Replies
6. Shell Programming and Scripting
Hi Everyone,
# ll
total 0
-rw-r--r-- 1 root root 0 2010-05-13 11:29 a1.log
-rw-r--r-- 1 root root 0 2010-05-13 11:29 a2.log
-rw-r--r-- 1 root root 0 2010-05-13 11:29 a3.log
# rm a.log
above rm no problem, but when i use "> a.log", it says "-bash: a.log: ambiguous redirect".
... (3 Replies)
Discussion started by: jimmy_y
3 Replies
7. Shell Programming and Scripting
Hi all,
Can you tell me how to empty all files in a directory with a "find" command?
It does not seem to work the way I try it:
# ls -l *.dat
-rw-r--r-- 1 root root 7 Jul 20 20:51 la2.dat
-rw-r--r-- 1 root root 4 Jul 20 20:51 la.dat
# find... (9 Replies)
Discussion started by: majormark
9 Replies
8. Shell Programming and Scripting
Hi,
How can I check if a file is empty?
I have read that I could done in this way:
if
then
echo "non-zero length file"
fi
But nothing happens (3 Replies)
Discussion started by: DNAx86
3 Replies
9. UNIX for Dummies Questions & Answers
Is there any way, we can find files not empty? I know one can find empty files by using find with -size is equalled to 0.
Please let me know, how I can find files greater than 0 or any other size in number? (2 Replies)
Discussion started by: videsh77
2 Replies
10. Shell Programming and Scripting
as of our requiremnt some x no of files will be created from a third party tool ,out of them one or two files will be empty i.e size is 0. so i want to remove those files which are empty.
naming of the files which are created will be like this
abc_.txt 0 size
abc_1.txt 4000 size
abc_2.txt... (1 Reply)
Discussion started by: srivsn
1 Replies