10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hello,
I am trying to delete a folder forcefully using the command:
rm -rf <dir name>
but its still asking for confirmation.
Please help me out with a solution.
scenario:
bash-3.00$ chmod 777 gcc-3.4.2
bash-3.00$
bash-3.00$
bash-3.00$
bash-3.00$ rm -rf gcc-3.4.2/
rm: examine files in... (3 Replies)
Discussion started by: harishisnow
3 Replies
3. Shell Programming and Scripting
All printers are created on the PROD server and my script must pick up the differences in a diffs.txt file
delete the printer if exist on the DEV server
recreate it as it currently stands on the PROD server from the diffs.txt
The following script I have, should allow me in synching the local... (0 Replies)
Discussion started by: ggoliath
0 Replies
4. Shell Programming and Scripting
I saw many post about this but could not find a specific answer to this question.
i have the following code
find . -depth -name "$FILEEXT" -ctime -30 -exec rm {} \;
when i type ./deletefiles.sh *.txt for example, it will find all the txt files less than 30 days old and delete them.
my... (9 Replies)
Discussion started by: new2learn09
9 Replies
5. Shell Programming and Scripting
Ok, so I just got charged with the task of deleting some 300 user folders in a FTP server to free up some space. I managed to grep and cut the list of user folders to delete into a list of one user folder per line.
Example:
bob00
jane01
sue03
In the home folder, there are folders a-z, and... (5 Replies)
Discussion started by: b4sher
5 Replies
6. Shell Programming and Scripting
Hi all,
I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt.
I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
Discussion started by: satish2712
5 Replies
7. UNIX for Dummies Questions & Answers
find ./ -name t\* | sed "s@^./@@" > .filestobedeleted
j=$(wc -l < .filestobedeleted)
typeset -i cnt=0
typeset -i i=0
while read line
do
myarray=$line
((cnt = cnt + 1))
done < .filestobedeleted
while (1 Reply)
Discussion started by: aishu
1 Replies
8. Shell Programming and Scripting
Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is:
find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \;
But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies
9. Solaris
Hi,
I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory.
So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically.
So my script should be like... (1 Reply)
Discussion started by: crown2100bd
1 Replies
10. Shell Programming and Scripting
Hi,
I have a folder with limited space. I do not have provisions to increase the space for this folder.
So i have to delete files which are more than 1 month old automatically.
But, i need to maintain the files created by 4 users and delete all the other files automatically which is more than 1... (4 Replies)
Discussion started by: vivek_scv
4 Replies