Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2007 06:25 PM
тАО05-12-2007 06:25 PM
script
Below is my file-system output I want to know how find and replace from /osxfiles to /osx using sed editor.
Filesystem 1k-blocks Used Available Used% Mounted on
/dev/disk9 3121344 1314624 1806720 42% /osxfiles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2007 06:49 PM
тАО05-12-2007 06:49 PM
Re: script
I do not know whether I got your question correctly. But from the first look, I think you want as below:
bdf| sed 's/osxfiles/osx/'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2007 02:01 PM
тАО05-13-2007 02:01 PM
Re: script
as i have one more like
/sap1/sap to /usr/sap
but i have some of the file systems like /sap1/opt , /sap1/usr.
if i use that other file-systems will also get effected.
regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2007 02:21 PM
тАО05-13-2007 02:21 PM
Re: script
~thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2007 05:11 PM
тАО05-13-2007 05:11 PM
Re: script
Like
present status:
osxfile
sap
I need as:
osx
usr/sap, etc.
Unless you let us know exactly what you want; it will delay you get a correct solution.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 12:33 AM
тАО05-14-2007 12:33 AM
Re: script
Here's some general comments, but if you're not confident with what you're doing you should be careful.
-------
You have a mountpoint named /osxfiles
You should not try to change the name of this directory as long as the filesystem is mounted.
Create a new directory named osx
Make sure there is no process using the /osxfiles filesystem.
Unmount the filesystem currently mounted on /osxfiles. Then mount it on the new mountpoint(directory) named osx.
mkdir /osx
umount /osxfiles
cp -p /etc/fstab /etc/fstab.old
cat /etc/fstab | sed 's/osxfiles/osx/g' > /etc/fstab.new
# Inspect the /etc/fstab.new
more /etc/fstab.new
# If file is ok, make it the active one
cat /etc/fstab.new > /etc/fstab
mount /osx
Find files with string 'osxfiles':
find / -type f -print | grep -l '/osxfiles'
NB! This will search through ALL files in your system and report the filename on files containg string '/osxfiles'
To change with sed the string osxfiles into osx in a file you do it like this:
cat myfile | sed 's/osxfiles/osx/g' | > /tmp/myfile.tmp
cat /tmp/myfile.tmp > myfile
Search and replace can also be done in 'vi' similarily as with sed.
example:
vi myfile
:s/osxfiles/osx/g
:wq
/Tor-Arne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 12:50 AM
тАО05-14-2007 12:50 AM
Re: script
For each mountpoint you wish to migrate, first create a directory to contain the filesystem, then modify the appropriate entries in /etc/fstab. Then 'umount
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 04:53 PM
тАО05-14-2007 04:53 PM
Re: script
Below is the output of the dbf i just wanted fire backup from this server excluding /,/stand and /tmp. I wanted to do this only with sed editor bcoz same script i will
put in some 150 servers and the problem is if i give bdf command it will show many
file-systems and backup should happen for all the file-systems excluding / /stand and /tmp.
$ bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 1494496 598520 71% /
/dev/vg00/lvol1 295024 73200 192320 28% /stand
/dev/vg00/lvol8 2826240 1918640 901648 68% /var
/dev/vg00/lvol7 1056768 1003352 53144 95% /usr
/dev/vg00/lvol4 77824 34904 42920 45% /tmp
/dev/vg01/lvol1 18530304 16975068 1530996 92% /oracle
/dev/vg00/lvol6 8245248 5311432 2910928 65% /opt
/dev/vg00/lvol5 20480 10432 10024 51% /home
so can any one tell me how to exclude these file-systems.
currently i have arrived only till. like below
$ bdf | awk '{print $6}'
Mounted
/
/stand
/var
/usr
/tmp
/oracle
/opt
/home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 05:30 PM
тАО05-14-2007 05:30 PM
Re: script
That means you want to exclude /stand and /tmp from the bdf output - possibly I assume that you are trying a fbackup with a graph file.
bdf|sed 1d| awk '{print $6}'|grep -Ev 'stand|tmp'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 05:42 PM
тАО05-14-2007 05:42 PM
Re: script
If you want to use only awk; then:
bdf|sed 1d| awk ' $6 !~ /(stand|tmp)/ {print $6}'
Rgds,
Rasheed Tamton.