Hello all
I need to search and replace in multiple files that are in directory hierarchy
Im using the :
find . -name "*.dsp" -print | xargs grep -n -o Test.lib" , I like to be able to replace every instance of Test.lib
with empty space .
how can I write one liner that does this ? (3 Replies)
i have to search a string and replace with multiple lines.
example
Input
echo 'sample text'
echo 'college days'
output
echo 'sample text'
echo 'information on students'
echo 'emp number'
echo 'holidays'
i have to search a word college and replace the multiple lines
i have... (1 Reply)
here's the case :
almost of php/html file on my site has added the text :
<iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
hi guys
does anyone know how to display the file paths of the files stored within a directory at the command terminal?
e.g. if i have a directory called "home", how do i display the file paths of the files inside the directory?
cheers (2 Replies)
I have 100+ python files in a single directory. I need to replace a specific path occurrence with a variable name.
Following are the find and the replace strings:
Findstring--"projects\\Debugger\\debugger_dp8051_01\\debugger_dp8051_01.cywrk"
Replacestring--self.projpath
I tried... (5 Replies)
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Hi all,
I have written a bash script to do a few things for my Splunk deployment, however, I am currently stuck on one part...
I need to the current working directory (I collect this with `pwd`) in the script as it could in theory be run from a number of locations. I'm not that great with... (5 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Discussion started by: jhilmil
12 Replies
LEARN ABOUT CENTOS
seunshare
SEUNSHARE(8) User Commands SEUNSHARE(8)NAME
seunshare - Run cmd with alternate homedir, tmpdir and/or SELinux context
SYNOPSIS
seunshare [ -v ] [ -c ] [ -C ] [ -k ] [ -t tmpdir ] [ -h homedir ] [ -Z context ] -- executable [args]
DESCRIPTION
Run the executable within the specified context, using the alternate home directory and /tmp directory. The seunshare command unshares
from the default namespace, then mounts the specified homedir and tmpdir over the default homedir and /tmp. Finally it tells the kernel to
execute the application under the specified SELinux context.
-h homedir
Alternate homedir to be used by the application. Homedir must be owned by the user.
-t tmpdir
Use alternate tempory directory to mount on /tmp. tmpdir must be owned by the user.
-c --cgroups
Use cgroups to control this copy of seunshare. Specify parameters in /etc/sysconfig/sandbox. Max memory usage and cpu usage are to
be specified in percent. You can specify which CPUs to use by numbering them 0,1,2... etc.
-C --capabilities
Allow apps executed within the namespace to use capabilities. Default is no capabilities.
-k --kill
Kill all processes with matching MCS level.
-Z context
Use alternate SELinux context while runing the executable.
-v Verbose output
SEE ALSO runcon(1), sandbox(8), selinux(8)AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com> and Thomas Liu <tliu@fedoraproject.org>
seunshare May 2010 SEUNSHARE(8)