Search Results

Search: Posts Made By: Tag
8,009
Posted By Tag
you can try something like ls -l filename ...
you can try something like

ls -l filename
-rwxr-xr-x 1 root other 29 May 8 10:07 filename

cp filename filename.`ls -l filename|awk '{print $8$6$7}'`

ls -l filename*...
2,296
Posted By Tag
you can try running it from roots cron and...
you can try running it from roots cron and calling the commands/script with the su command
su - userid -c yourcommand
you will be safest pathing the su command and your commands/script
8,031
Posted By Tag
ok, to get the user dir/name for the permissions...
ok, to get the user dir/name for the permissions try
userid=`echo $userdir | awk 'BEGIN {FS="/"} {print $3}'`
so after using the cd command, your chown comand becomes
chown -R $userid:$userid *...
8,031
Posted By Tag
I think what was ment was put the above commands...
I think what was ment was put the above commands you gave into a script and read in the directories from the file, ie.

while read userdir
do
..
your commands
..
done < source.txt


so...
7,358
Posted By Tag
sed '/Ex.FLIGHT PLAN/d' filename > newfilename
sed '/Ex.FLIGHT PLAN/d' filename > newfilename
1,397
Posted By Tag
zxc > zxc.text 2>&1
zxc > zxc.text 2>&1
6,121
Posted By Tag
Change the way you read in the data from the...
Change the way you read in the data from the file, read in as 2 variables rather than single line:
while read field1 field2
2,284
Posted By Tag
can try: head -1 testfile |cut -c15-18 so if...
can try:
head -1 testfile |cut -c15-18
so if you want to assign it to a variable within another script etc. it would be:
var1=`head -1 testfile |cut -c15-18`
1,910
Posted By Tag
In each users home directory there is a file...
In each users home directory there is a file called ".sh_history", this is the shell history for the user and contains the latest commands they have been executing.

Just use a listing of the...
2,817
Posted By Tag
I had a similar problem a while back. I used to...
I had a similar problem a while back. I used to kicked off a few cron jobs on a daily basis and found they were still running days later. In my case the cron jobs were hanging while trying to access...
2,765
Posted By Tag
can try a simple script as such: for i in...
can try a simple script as such:

for i in `cat filelist`
do
v1=`cat $i | head -2 |tail -1|awk '{print $2}'`
cat $i | sed "s/$v1/123456/1" > tempfile
mv tempfile $i
done

where...
5,089
Posted By Tag
change the > to >> so it appends to the end of...
change the > to >> so it appends to the end of the existing file, so the line becomes

[DOWN]" >> c:/Test/Sample
25,380
Posted By Tag
mv `ls -tr |tail -1` newdirname
mv `ls -tr |tail -1` newdirname
2,526
Posted By Tag
sort filename |tail -1
sort filename |tail -1
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 05:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy