Accidentally Changed File Ownership to Include a "Comment" [AIX]
Hi.
I've had a little mishap.
To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership.
For example, I now have directories full of stuff like:
And I can't seem to find a way to change it back.
Any help would be appreciated!
Thanks.
Last edited by Scott; 10-05-2012 at 11:41 AM..
Reason: update
Hi scott, do you remember whaat you typed? (hehe so I can corrupt my machine also...)
I cant recreate the situation so difficult to give any suggestion for now...
A while ago I was asked to remove some users from a production system. Rather than removing them I commented them out in /etc/passwd
i.e.
I also removed a symbolic link in /home to the actual home directory, and renamed the actual home directory to something else (i.e. /app/some/dir/prod/userX_DELETEME).
This was handy because a few days later I was asked to put some of the users back!
It's quite a few users so I thought I would write a script to do it recreate the link and rename the directories.
I've generated code to grab the username from the /etc/password but somehow got "# Scott" instead, and for reasons unbeknown seem to have run chown -R on the directory using "# Scott" as the owner, instead of the username.
I'm not quite sure why I ran chown but I have, and now I have a whole bunch of home directories which, when listed, show the owner as "#Scott -". ls -ln.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
I was trying to delete and recreate a filesystem, thinking it would be a quick way of deleting all of the files off of it, and I fear that I messed up. Here is the original entry from /etc/filesystems:
data01:
dev = /dev/fslv00
vfs = jfs2
log ... (5 Replies)
Hi All,
Accidentally changed ownership of /var directory as root :eek: thinking that I am changing ownership of var directory in other location in the file system:D.Now unable to SSH into the server:(.
By gods grace I was able to regain the access again as server was in control of me at that... (5 Replies)
Hi All,
I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :(
which have similar names ( /var in root and var of some other directory ).:confused:
Can some one suggest me with the... (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Dear All,
I was having powerpath 5.2 on SUN server with SVM connected to CLARIION box.Please find the following output :
root # powermt display dev=all
Pseudo name=emcpower3a
CLARiiON ID=CK200073400372
Logical device ID=60060160685D1E004DD97FB647BFDC11
state=alive; policy=CLAROpt;... (1 Reply)
Hi everyone,
I`ll try to be most clear I can explaining my help request.
I have 2 folders
Folder A-->This folder receives files through FTP constantly
Folder B-->The files from Folder A are unzipped and then processed in Folder B
Sometimes Folder A doesn`t contain all... (2 Replies)
Hi Everyone,
# cat a.txt
a;b;c;64O
a;b;c;d;ee;f
# cat a.pl
#!/usr/bin/perl
use strict;
use warnings;
my $tmp3 = ",,a,,b,,c,,d,,e,,f,,";
open(my $FA, "a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\;/, $_);
if ( ($tmp =~ m/^(64O)/i) || ($tmp... (3 Replies)