Reputation
799
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 12
Newest
 Yearling
Impact
~23k people reached

  • 0 posts edited
  • 2 helpful flags
  • 3 votes cast
Jun
13
comment Why gnome-terminal does not allow unlimited scrolling
Yes 300-400 lines are usually enough but my putty sessions are usually set to 1000 lines, although I can't recall anytime in the recent-enough past that I needed to scoll past 10-12 screens which is about 250-300 lines. Again, screen buffer is not your replacement for logging. If your logs are not helping you find what you need, consider changing your log parameters and the method you are searching them.
Jan
13
comment script needs to add another loop
To the best that I know, netstat doesn't show you any process IDs (PIDs). On the other hand, your process may have the port number (1505 in your example) listed as an argument, in which case you should go with that and skip netstat command. Otherwise I am unable to understand your question, like the first comment author, Bratchley. As a side note, you can use lsof command, grep for the port number and parse the output for the PID if this is your intention.
Jan
13
comment How do I schedule a cron task to run
cron is not that advanced when it comes to scheduling tasks. What you are trying to accomplish is a job for advanced task schedulers, likes of Tivoli Maestro et al. Using cron, the best way is to run your job on days 0,4,5,6 and at the script entry point, perform a logic check regarding the day of the week and time of day to determine if you are in the "run" period. If not, just exit.
Nov
16
awarded  Yearling
Nov
7
answered Re-order text on each line in a file
Jul
22
comment how to verify if root password changed correctly
@UlrichDangel: unfortunately, expect is a luxury that we do not have deployed across the enterprise and I can not decide wily-nilly to deploy it without going through a rigorous vetting process, which may take in the order of months, with a strong probability of denial.
Jul
22
comment how to verify if root password changed correctly
@HBruijn: I am not planning to bury the clear text password into the script. It will be placed in a file for the duration of the script run, where and when it will be read from file and assigned to a variable, and be destroyed after test is complete and the temporary file will be removed manually. I know it is not bullet-proof but being in a quite bit fortified security environment, I think I can take that much of risk for a short period of testing time.
Jul
22
awarded  Student
Jul
22
asked how to verify if root password changed correctly
Jul
21
comment How can I assign an initial/default password to a user in Linux?
Yes, I used this many times but, as with almost any other command, it is not the defacto solution to the problem at hand. Some variations of passwd binary, do not support the --stdin switch.
Jun
17
awarded  Constituent
Jun
11
awarded  Caucus
Mar
5
comment Sudo changes PATH, yet executes the same binary
In your PATH, /usr/local/bin preceeds /usr/bin. I think it is somehow expected to stop the search and run the executable once it is found. And the location it gets to be found is /usr/local/bin the first time. Unless of course your sudo was compiled with a different default PATH
Mar
5
comment replacement script multiple targets
possible duplicate of case sensitive substitution; same target ids
Mar
5
comment Configuring a tftp server for multiple clients
Together with not being totally confident with this statement, I think you will need to run multiple tftpd instances with different root directory configurations as well as different ip addresses, as tftp is pretty dumb at what it does, hence the "t" at the beginning for "trivial". I saw this article a while ago. You might want to take a look at it: selbytech.com/2009/10/…
Feb
24
comment rsync multiple files to multiple directories
I have never used the --inplace switch but seems like it updates and existing file on the destination. And if your destination is, somehow forcing a confirmation, i.e. hit 'y' or 'n', that might explain why it is hanging. Try making the destination file names such that they will not exists in ther detination location and see if your script will proceed w/o needing a ctrl-c etc. Just a troubleshooting suggestion, not intended to be a solution.
Feb
22
comment Directory mounted under regular user is inaccessible from said user
I am not really familiar with sshfs but since ssh itself is in the mix, it is helpful, if not mandatory to check the ownership permissions of .ssh directory and its contents. ls -ld ~/.ssh and ls -l ~/.ssh outputs may give some useful information.
Nov
18
comment Using alias in another script (ksh)
to reiterate some of the sentiment above, using aliases in a script is a bad idea from the get-go. if you know what that alias is running, why don't you do something like this : (say alias is as such "mycmnd=/usr/sbin/grep") in your script you can use MYCOMMAND=/usr/sbin/grep and then everytime you need to use this command, you can reference it by $MYCOMMAND.
Nov
18
answered Ksh script warnings
Nov
16
awarded  Yearling