10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
2. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
3. Shell Programming and Scripting
Hi Team,
I have to remove files which are more than 7 days in my target directory.
I have this script but using this i faced some problems like, removed library files of unix.
for abc in `find /xxx/abc/OutputFiles/xxxx_*.txt -type f -mtime +5|xargs ls 1`
do
echo "xxx files are:"$abc
... (1 Reply)
Discussion started by: harris
1 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
Discussion started by: akshay01987
1 Replies
5. Shell Programming and Scripting
Hi
We want to delete a single file from the destiantion directory using rsync. Is it possible to do this ? or Do we have any alternate approaches in rsync( for ex applying some filters ..etc)
For ex:
-----------------------------------------------
Source (Folder)
... (3 Replies)
Discussion started by: MVEERA
3 Replies
6. Shell Programming and Scripting
I am using the below command to delete files from directories and subdirectories
find /test/abc/xyx -type f -mtime +7 -exec rm -f {} \;
there are some subfolders in xyx for which i don't have permission to delete.
Is there a way i can check the permission of the folder first and then delete... (4 Replies)
Discussion started by: ch33ry
4 Replies
7. Shell Programming and Scripting
Hi there,
i have a question.
I have a folder called /usr/test
There is a file in it.... test.csv
I need not a shell script that checks if there is a file called: test.del
And if the file is in the same folder then the script should delete the test.csv and also the test.del.
Hope... (9 Replies)
Discussion started by: Bjoern28
9 Replies
8. Shell Programming and Scripting
Hi,
i have the directory structure
directory /home/ncs/controller/logs/
in this path i have following directories
cl03032010
cl04032010
cl05032010
cl06042010
i want to delete the folders which are 2 weeks old.. through the crontab (2 Replies)
Discussion started by: mail2sant
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: viv1
6 Replies
10. Shell Programming and Scripting
I have been working on a script to list all the name's of a subfolder in a text file then edit that text file and then delete the subfolder base on the edited text file so far I have been able to do every thing I just talked about but can't figure out how to delete the subfolers base on a text file... (8 Replies)
Discussion started by: bone11409
8 Replies