10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script.
script was return as follows.
find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f
find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
2. Shell Programming and Scripting
How to write in awk to remove lines starting with "#" and then process the file:
This is not working:
cat file|awk '{if ($0 ~ /^#/) $0="";print NF>0}'
When I just give cat file|awk '{if ($0 ~ /^#/) $0="";print }'
it prints the blank lines . I don't wnat the blank lines along with the... (15 Replies)
Discussion started by: rveri
15 Replies
3. UNIX for Dummies Questions & Answers
How do you delete/remove multiple files ? (5 Replies)
Discussion started by: nosuchluck
5 Replies
4. UNIX for Dummies Questions & Answers
The task: remove undesirable characters from filenames.
Restrictions: Must use basic RE, base utilities (non-GNU) and /bin/sh (ash). No ksh, zsh, perl, etc.
Below is what I've come up with. It seems to work OK but I'm open to shorter, more efficient alternatives.
Inside the square... (4 Replies)
Discussion started by: uiop44
4 Replies
5. Shell Programming and Scripting
I am working with bash on HP-UX server at school.
As practice for scripting, I am trying to make a pretend server admin script that adds a user to the system, deletes a user from the system, and lists all users of the pretend system. I have accomplished this with a select loop. Adding users, and... (2 Replies)
Discussion started by: masterscout1977
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
This might seem like a really stupid question but i have created a shell script and at the end of the script i want to remove most of the file i create. So I have:
rm file test sorted
However this does not work for the sorted one. The only way i can get this to work is if i do:
rm... (4 Replies)
Discussion started by: jazz8146
4 Replies
7. Shell Programming and Scripting
Dear all,
I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..)
I have tried with the command
find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \;
but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies
8. UNIX for Dummies Questions & Answers
Hello all,
I'd like to remove files which is returned by the following statement
ls -l arch*.dbf|grep "`date|cut -c5-10`" (cut -c5-10 =Mar 20)
To achive this,I tried the following statments but none worked ..
rm < `ls -l arch*.dbf|grep "`date|cut -c5-10`"`
rm `ls -l arch*.dbf|grep... (8 Replies)
Discussion started by: luft
8 Replies
9. Shell Programming and Scripting
In perl I want to do remove the top line of my input file then process the next line. I want to do something like
head -1 inputfile > temp
grep -v temp inputfile > newinputfile
cp newinputfile inputfle
is this possible in perl? (3 Replies)
Discussion started by: reggiej
3 Replies
10. UNIX for Dummies Questions & Answers
I am trying to remove a file so that I can delete a directory. Unfortuantely the file looks like this --------.--- and the system is not allowing me to remove the file. System message is
rm: Error: Illegal option -- -
usage: rm file...
I have tried rm * and rm *.* to no avail.
Any... (5 Replies)
Discussion started by: Blondie
5 Replies