10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to remove empty files tried below command its remove only zero bytes not empty file which is greater then zero byte.
for x in *
do
if
then
rm $x
fi
done (8 Replies)
Discussion started by: Kalia
8 Replies
2. Shell Programming and Scripting
I have a script, which is supposed to run 1 day of the month, connect to remote server certain directory, find files, tar the, and copy
find . -ctime -1 | tar -cvf transfer_dmz_start_monthly.tar *${Today}*.*;
if
then
echo "Cannot create a tar file, the terminated... (2 Replies)
Discussion started by: digioleg54
2 Replies
3. Shell Programming and Scripting
Hi Friends,
I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies
4. SCO
I know someone will probably laugh at this question, I probably knew the answer many years ago when I was doing this full time but here goes.....
I have a directory that has many files and sub-directories in it, RMDIR will not delete a directory that is not empty so what is the command to... (1 Reply)
Discussion started by: moondogi
1 Replies
5. Shell Programming and Scripting
Hello Friends,
Im trying to delete empty files in subdirectories with a command. I can find them checking only one directory in each step and then show them with my command like below moreover i could not add removing part:
ls -l */* | awk '{if ($5==0) printf "%3s %2d %s... (5 Replies)
Discussion started by: EAGL€
5 Replies
6. 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
7. Shell Programming and Scripting
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
Discussion started by: cat123
5 Replies
8. Linux
Hi Guys,
I want to know wheather it is possible to delete directory not files,
Example:
In one directory there are 10 dirs and 100 files but my req is to delete only dirs not file
Wheather it is possible ? (13 Replies)
Discussion started by: manoj.solaris
13 Replies
9. 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
10. UNIX for Advanced & Expert Users
Hi,
I accidentally deleted a big directory with all its sub-directories and bunch of source code files which I have been developing for about 2 years... What will I do now, how can I retrieve my files, directory hierarchy back ???
If anyone, please HELP ! ! ! ... (4 Replies)
Discussion started by: milhan
4 Replies