Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live

Collecting logs between two time stamps

Hi, please help me to collect the entire log files between two time stamp. for example, I am looking script to collect the entire log between "2015-03-27 15:59" to "2015-03-27 16:15" in the below...

View Article


Save output of updated csv file as csv file itself

Hi, all I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file. test.csv Code: SourceFile,DateTimeOriginal...

View Article


C code doubt

hi all, I am not a C expert. can you tell me what does the below C program does. Code:   #include <stdio.h> #include  <stdlib.h> #include <string.h> #define MAX(a, b) (a > b) ? a :...

View Article

Perl ftp doubt

plz cancel the message I have provide the credentials in the .netrc file for the user id kiwis_us\ftp_dev. when I tried to connect manually it connected. But when I tried through perl the user id is...

View Article

SFTP problem in HP UX

Dear All, Previously we push file using ftp in outside node. Now we try sftp, but connection is not established. I am provide you the debug log. Any idea to solve the issue? Code:...

View Article


How to build an install server for Solaris 8?

I need to boot again a server with solaris 8 because I have a problem with the file path_to_install and I have not a CD/DVD driver. So I'd like to build an install server for executing a boot by...

View Article

Delete file content by asking uer Yes/No...

I have following script to ping multiple ips but i want to delete ip.csv file content after running script .....but before deleting content i have ask user yes/No prompt depend on user input Yes/no...

View Article

Script to replace lines in ksh Script

Hi All, I am novice to Unix and I need your expert advice for the below task. There is a KSH script file in which I need to replace few line as per the below expectations. So my file look like as Code:...

View Article


OS Watcher not running with cron scheduler

Hi team, O.S : Oracle Linux Issue : I am facing issue when running OS watcher script from cron scheduler. But when i run the same command manually, its getting executed. Note : I have to press " Enter...

View Article


Match and Append Based on file contexts

Not Sure how to do this. Some combo of awk and sed perhaps. If String in File1 match String in file2 then append file2 File1.txt Code: BullTerrier Boxer Bulldog File2.txt Code: <Defined...

View Article

How to restrict user to a particular directory?

hi, I want to restrict some user access to only 1 directory (including all sub-directories/files in it). can you please explain me, how can we do this? example; Code: Filesystem    GB blocks      Used...

View Article

Obtain pattern from file; Append 1st Match

Not clear how to do so. Looking to append the 1st match of said pattern with 'OK TO REMOVE' file containing patter File1.txt Code: RMS_QUANTITY_RT SMS_QUANTITY_RT file to search File2.txt Code: <!--...

View Article

Confused by the sed command

Hi Gurus, I am a little bit confused by the sed command. my file is below Code: cat sample aaa bbb ccc ddd eee fff ggg hhh iii below is command and output. Code: sed  '/ddd/{x;p;}' sample.txt aaa bbb...

View Article


Add specific text to columns in file by sed

What is the proper syntax to add specific text to a column in a file? Both the input and output below are tab-delineated. What if there are multiple text/fields, such as /CP&/2 /CM&/3...

View Article

Samba on AIX, issues setting read-only flag on files?

Hello, I am having issues setting the "read-only" flag via Windows Explorer on my AIX Samba share... I have on my AIX 7.1 system installed Samba 3.6.24 and configured, joined to our Windows domain...

View Article


Match text and print/pipe only that text

I'm trying to pull an image source url from a html source file. I'm new with regex. I'm in BaSH. I've tried Code: grep -E 'http.*jpg' file which highlights the text, but gives me 2 problems: 1) Results...

View Article

Unable to change the permission for directory

unable to chnage the ownership as group does not exist Code: ls -ltr drwxr-xr-x  2 1520291  remote      1024 Sep 25  2014 img root@servername#chown content:remote img chown: img: Not owner 

View Article


Rename link after creation

I'm using ln 'myfilepath' 'newlocationpath' to create a hard link to a file, but how can I rename the file afterwards?

View Article

Tablespace growth trend

Hi experts, I have the below details with me.How to calculate the tablespace growth between two dates. sample data(have data upto 1 year): HTML Code: INSTANCE_NAME      DATE    TABLESPACE_NAME...

View Article

awk - OFS printing duplicate. Why?

Why the following code printing duplicate records? bash-4.1$ cat rm1 Code:         c1      c2      c3 l1      2      3      4 l2      2      3      2 bash-4.1$ awk '{print $0} OFS = "\n"' rm1 Code:...

View Article
Browsing all 16232 articles
Browse latest View live