10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to keep last 2 days data from a file and want to delete others data from the file. Please help me.
Sample Input
# cat messages-2
Apr 15 11:25:03 test1 kernel: imklog 4.6.2, log source = /proc/kmsg started.
Apr 15 11:25:03 test1 rsyslogd: (re)start
Apr 16 19:42:03 test1 kernel:... (2 Replies)
Discussion started by: makauser
2 Replies
2. UNIX Desktop Questions & Answers
Guys, can you tell me how to delete directory and sub directory with files in them, for example:
/system/upgrade/title/sub/var/vito/
I would like to delete 'title' and everything under it. Every sub dir contains files which need to be deleted as well.
Thanks (1 Reply)
Discussion started by: DallasT
1 Replies
3. UNIX for Dummies Questions & Answers
I hava a windows NTFS partition on fedora15. The partitions auto-mounts to /media/Data ever starting of KDE.
/dev/sda5 on /media/Data type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
But I cant change the file permission in this... (1 Reply)
Discussion started by: vistastar
1 Replies
4. Shell Programming and Scripting
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies
5. Shell Programming and Scripting
Hi all
I currently use the following in shell.
#!/bin/sh
while read LINE
do
perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile"
done < "listfile"
NOTE the single quote delimiters in the expression. It's highly likely the 'LINE' may very well have characters in it... (3 Replies)
Discussion started by: Festus Hagen
3 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a program which at run time creates a shell script and tries to redirect the output of the same to another file. both of the files are created at run time with different names.
The problem is: the file it is redirecting to is being created as:
-rw-r--r-- 1 root tech 69... (1 Reply)
Discussion started by: chandan.sharma
1 Replies
7. UNIX for Advanced & Expert Users
Hi Xpert Out There
I have a lots of file in this path :
-rw-r----- 1 oracle dba 3954176 Dec 21 2006 1_2008.dbf
-rw-r----- 1 oracle dba 887808 Dec 21 2006 1_2009.dbf
-rw-r----- 1 oracle dba 143872 Dec 21 2006 1_2010.dbf
-rw-r----- 1 oracle dba ... (3 Replies)
Discussion started by: adzuanamir
3 Replies
8. Shell Programming and Scripting
Hi,
I have an dir which has 50K file, some of them are empty. I want to delete the empty file from the dir. I am planning to use the following command.
ls -l | grep " 0 " | awk '{print $9}'
I can copy this to an file and then how do I use this file to delete the empty files.... Any help... (2 Replies)
Discussion started by: Script40
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to know how the file permision should change to 755 automatically once the file is created. At the moment I do it explicitely by changing the permission mode to 755 using chmod command.
The default permission for a new file in my system is 644 (-rw-r--r--).
Thanks
Saumya (6 Replies)
Discussion started by: sommyp
6 Replies
10. Shell Programming and Scripting
hi
i am having four files in a directory.like
1)sampleRej
2)exampleRej
3)samplemain
4)examplemain
my requirement is i have to search for the rejected files (sampleRej,exampleRej) in a directory.if these files in that directory then i have to delete the main files... (3 Replies)
Discussion started by: srivsn
3 Replies