Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Little
6,347
Posted By Little
How to Switch from Local user to root user from a shell script?
Hi,

I need to switch from local user to root user in a shell script.
I need to make it automated so that it doesn't prompt for the root password.

I heard the su command will do that work but...
903
Posted By Little
How to move to the last subdirectory one by one?
Hi,

How can i traverse to the last subfolder in all the directories.
eg:
i have the below folders structure
f1/sf1/r1
f2/sf2/r2
f3/sf3/r3/r4

i need to move to the last directory in each...
2,434
Posted By Little
How to swap to words in a file?
Hi,

I have a file with certain lines in it.
i want to swap every occurance of word A with B and every occurrance of word B with A.

Example
file.txt
Unix is a great OS.
Linux support...
8,383
Posted By Little
i am using HP-UX. there is no nawk or gawk...
i am using HP-UX. there is no nawk or gawk commands on this.
Can i do it using any other command which takes less time?
currently i am using the below block
but i guess it will take a lot of time....
8,383
Posted By Little
Got the below error awk: Input line cannot be...
Got the below error
awk: Input line cannot be longer than 3,000 bytes.

I guess the line size inside the 2nd file is more tha 3000 bytes.

Any other solution?
8,383
Posted By Little
How to compare 2 files and create a result file with unmatched lines from first file.?
HI,

I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213

file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf...
3,766
Posted By Little
How to save a file directly into windows from UNIX?
Hi,

How can i save a file directly into my windows file system by running a shell script from my unix file system.

I need to fetch data from a database and save it in a file. Since the data...
2,988
Posted By Little
Thanks for the solution. Can you please explain...
Thanks for the solution. Can you please explain it?
2,988
Posted By Little
Its not a homework question. I got a small task...
Its not a homework question. I got a small task of clearing all the old files from all the directories except archive. Instead of going to each 200+ directories and deleting the files manually,...
2,988
Posted By Little
How to delete all the files and folders inside all the directories except some specific directory?
hi,

i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D...
1,081
Posted By Little
Hi Ravinder, thanks for the code, I tried your...
Hi Ravinder, thanks for the code, I tried your code, I know its a correct one but ksh shell is not able to recognize maxdepth and mindepth options of find command.
1,081
Posted By Little
Getting all the subdirectories inside directories in excel file
Can anyone help me with a short command or script for the below scenario

there is a path,
/a/b/c/home??
Inside the above path there are number of subdirectories such as
one
two
three
four
...
16,883
Posted By Little
What is -oStrictHostKeyChecking option in SFTP Command?
Can anyone explain me the below sftp command

sftp -oStrictHostKeyChecking=no @SFTP_PROXY_COMMAND@ -v oIdentityFile=$sftpIdentity -b $PutSFTPbatch.bat $sftpUrl

I need explanation for the below...
880
Posted By Little
How to rename all files at a time by appending some characters at the begining?
Hi

I have a list a filename in a directory starting with particular pattern
for example:
abc_1234.txt
abc_7565.txt
abc_7676.txt
abc_7765.txt

i need to rename all these files by appending...
13,218
Posted By Little
I agree Mr rbattle, things are temporary in this...
I agree Mr rbattle, things are temporary in this world. But dnt you think there are many people who are going to be benefited with this temporary solution too.
There are 1000's of post which have...
13,218
Posted By Little
I am using expect script. But the script stops in...
I am using expect script. But the script stops in between after a specific period of time and all the directories and contents are not copied to the target server. Can I extend this timeout time?
...
13,218
Posted By Little
How to provide password for rsync in shell script?
Hi, i want to call the rsync in a shell script so that i can run it in background by passing the password within script itself. Can any one please let me know how can i provide the password in the...
11,293
Posted By Little
It is for temporary purpose so actually i dnt...
It is for temporary purpose so actually i dnt want to set up password less ssh. Can you suggest somethig in which i can pass the password in the script.
11,293
Posted By Little
How to run sftp in shell script without prompting for password?
Hi,

Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password?
I used a expect script but it timesout after some...
2,196
Posted By Little
sed command help
Can anyone tell me what does the below sed command do?

Value=`grep 'hello world' filename | sed '/^.*=//'`

Correct me if anything is wrong in that command.

Please explain /^.*=/..
1,487
Posted By Little
Yes its linux ubuntu 14.04 ---------- Post...
Yes its linux ubuntu 14.04

---------- Post updated 12-03-14 at 12:06 AM ---------- Previous update was 12-02-14 at 11:46 PM ----------



I want to search for a particular file say f1 in ...
1,487
Posted By Little
How to search in specific directory using find?
Hi,
Is there any way to use find command and search only specific subdirectories in a directory.
for example
/home/d1
/home/d2
/home/d3
i want to search in the following directories
/home...
7,903
Posted By Little
Not exactly, these are just sample tags, ...
Not exactly, these are just sample tags,
Newlines are almost like same but spaces are not can be more or less. But the tag starts with <> and end with a </>. inbetween these two there are sub tags.
7,903
Posted By Little
Extracting the tag name from an xml file
Hi,

My requirement is something like this,
I have a xml file that contains some tags and nested tags,


<n:tag_name1>
<n:sub_tag1>val1</n:sub_tag1>
...
12,210
Posted By Little
I have installed cygwin. I choosed install from...
I have installed cygwin. I choosed install from internet. Its not displaying any download sites or links.

---------- Post updated at 02:41 PM ---------- Previous update was at 02:40 PM ----------...
Showing results 1 to 25 of 196

 

Featured Tech Videos

All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy