General :: Identify The PID Number Of Login Shell?

Oct 12, 2010

what are the two ways you can identify the PID nimber of your login shell

View 14 Replies


ADVERTISEMENT

General :: Get A Shell Script To Loop Through A Number Of Directories And Subdirectories?

Jul 27, 2010

I'm looking to get a shell script to loop through a number of directories and subdirectories,looking for files that contain a particular substring, and renaming the file by replacing the search string with a different substring. For example if you had a directory full of folders that contained digital photos (along with various other files which would need to remain unaffected), and the intent was to remove the "DSC_" prefix from several thousand files buried within. I've whipped up a rather long-winded solution that works well for this purpose but chokes on directory names with spaces. I am reasonably sure there's a 2 or 3-liner that would accomplish this exact same task.

function investigate
{
path=$1
for file in `ls $1`
#for file in *

[code]....

View 1 Replies View Related

General :: Find The TCSH Shell And Gzip Version Number?

Apr 7, 2010

I need to find TCSH shell and gzip version number by running a acript on several boxes through ssh. How can i do that? I made a script for tcsh but it is not working by ssh , it only works on my box . I dont know from where to find the gzip version info.

View 5 Replies View Related

General :: Determine Number Of Rows And Columns Of File In Shell?

Mar 4, 2010

if there's a tab-delimited file under /usr/desktop, how can I determine the number of rows and columns of the file in shell?And, if told the the 3rd column of the file contains only numerical values and all values in the 5th column are unique, how can I verify these in shell?

View 13 Replies View Related

General :: Write Shell Script That Give A Number Between 1-3444 From User

Feb 18, 2011

i want to write shell script that give a number between 1-3444 from user and if user enter out of range number give error e.g number must between

read -p "plz Enter Number " p
while [ $p != [1-9] -o $p != [1-9][0-9] -o $p != [1-3][0-4][0-4][0-4] ]
do
read -p "plz Enter Valid Number" p
done

but this have an error in while statement ! two many argument

View 3 Replies View Related

General :: Write Shell Script Which Can Take Number Of Files And Count Total Rows From All CSVs?

Oct 8, 2010

I need to write shell script which can take number of files and count total rows from all CSVs and display total number of rows counted in all files. Is there any possibility of doing that using shell script and if yes then how.

View 4 Replies View Related

General :: Diffrence Between Login And Non Login Shell?

Feb 17, 2010

diffrence between login and non login shell. What does it mean by user enviorment.

View 3 Replies View Related

General :: Let A User Be Able To Login Via Telnet A Max Number Of Times Equal To 2?

Jan 25, 2011

If I only want to let a user be able to login via telnet a max number of times equal to 2 how would I go about doing this?I have found this little tid bit:per_source = 2but that only allows 2 connections from the same source (i.e. network) and that would not work. For some reason our telnet sessions are not dying off after a user has shutdown their PC and then the next time they login it adds another telnet session.

1. user1 31300 /dev/pts/409
2. user1 27539 /dev/pts/539
3. user1 18042 /dev/pts/316

[code]....

View 4 Replies View Related

General :: Get Output Of Text File Containing Account Number, Debit Amount, Credit Amount,date Using Shell Script?

Apr 9, 2011

How to get output of text file containing account number, debit amount, credit amount,date using shell script?

View 1 Replies View Related

General :: How To Fix A Crashing Login Shell

May 20, 2009

Hello.I am using Opensuse 11.1 (just installed),gnome-based .My problem is,I can only login as root,cos the tty's attached to my normal user(non-privileged)keep crashing(I checked this with last).Is there any way I can fix this?I reinstalled several times,nothing to do.

View 9 Replies View Related

General :: How To Login As Root In Shell

Jul 20, 2010

How to login as root in linux shell?

View 3 Replies View Related

General :: How To Change Shell Without Login

Jul 26, 2011

I work with a text mode debian6.0 and when I was testing some commands, I changed default shell to ash. System replied that it has not ash shell.so I thought the shell did not change. But when I start the system again and enter root password, I see a message like "can not execute ash. No such file or directory" and then system return to login page again. Root is the only user on that system.

View 11 Replies View Related

General :: Login Shell And Consequent Subshells

Jun 13, 2010

When we are asked for password while booting Linux, is that the login shell ? If yes, we can't seem to be able to do anything in that shell besides typing the password. (Is it in this that the contents of /home/.profile file gets executed ? in a sigle PC)

When we click on the terminal icon for the first time, are we opening a subshell of something or a new shell altogether? If on repeatedly clicking on the terminal icon, new shells are being launched, not sub-shells, then why does export seem to work with the new shells, though its supposed to work for subshells ?

View 2 Replies View Related

General :: A Script For Deleting User , If He Has No Login Shell?

Nov 25, 2010

I want to create a script to delete user if he has no login shell.

View 4 Replies View Related

General :: Online Shell / Bash Login Using SSH Port

Sep 18, 2010

Any one tell me online bash login using putty [ssh port] for practicing a linux.

View 6 Replies View Related

General :: Shell Script To Automatically Login Through Ssh And Create User?

Oct 20, 2010

I was trying to create a shell script which will automatically login to the server 192.168.1.7 and checks if a user exists there or not, if it doesn't exist then it should create the user.I have very little idea about shell scriptThis is what I tried:Quote:

#!/bin/bash
pass="sacharje"
ssh 192.168.1.7

Now, how to pass that password automatically to the ssh when it asks for the password? (I can't use public key authentication here)

View 10 Replies View Related

Fedora Installation :: F13 To F14 No Shell At Login / After Upgrading Cant Login On User?

Jun 3, 2011

yesterday I updated my fedora 13 to fedora 14 (on laptop) and today i cannot log in on user. It just go blank for a sec and is back to login.

At text console (alt+ctr+f2/f3) i enter my username and pass it give this for a sec and resets (clean) console
username: Name
password:
last used: [date]
login: no shell permission denied

i used unetbootin (fedora 14 netinstall to update) and later i updated 1,5G before reboot (did update that fix, forgot its name tho :s)

I would most likely reinstall everything, but i have some work at laptop and as death-line is near, i would prefer to fix it if possible.

edited:
i have installed F13 on unused space, is there a way for me to access and fix it? or at least get some files from there?

View 1 Replies View Related

Server :: Shell Command Which Allows To Have Number Of Requests/seconds Under Apache?

Jun 26, 2010

1-Can I have the shell command which allows me to have the number of reques ts/seconds under the Apache server?

2-And the number of sons threads in service/wait?

View 3 Replies View Related

Programming :: Count Number Of CD-ROMs On A System Using Shell Script

Apr 7, 2010

I am trying to get the count of number of CD-ROMs attached with my Linux system using a bash shell script. I have decided to use the following method for it:

Code:
debian:~# cat /proc/sys/dev/cdrom/info | grep "drive name:"
drive name: sr0 hdb

So basically I know that there are two CD-ROMs attached to the system. Now there can be three also like this:

Code:
debian:~# cat /proc/sys/dev/cdrom/info | grep "drive name:"
drive name: sr0 sr1 hdb

All I want to do is in my shell script to get the count of the devices in a variable using the above command.

View 2 Replies View Related

Ubuntu :: Number Pad Not Working After Login

Sep 4, 2010

I can't think of what would cause this problem. The num lock light is on and I can sign in with the number pad (password is all numbers) but when I get into Ubuntu the number pad stops working with numlock light on or off.

View 4 Replies View Related

General :: Unix Ps -l Priority Whoes One Number In Column "PRI" But In Same Time Ps -o Pri Shows Another Number?

May 21, 2011

Why does unix ps -l whows one number in column "PRI" but in same time ps -o pri shows another number? cpu and nice are zero for those processes

View 1 Replies View Related

General :: Login As Other User Using Shell Doesn't Load The Profile For That User?

Dec 11, 2009

I am using the sudo command to log on locally as another user by the following command:

sudo -u theotheruser -s
or
sudo -u theotheruser sh

As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.

View 11 Replies View Related

Security :: Ssh - Sshd Parameter To Set To Block Out User After Number Of Attempts Tp Login?

Apr 28, 2011

Is there an ssh or sshd parameter that can be set to block out a user after a set number of attempts tp login ?

View 1 Replies View Related

Ubuntu :: Shell, Auto Append Number To File And Read From External File?

Oct 31, 2010

Code:
cat ${SOURCE}/{start,universal,index,end}.txt > ${SERVER}/index.html
cat ${SOURCE}/{start,universal,02042010,end}.txt > ${SERVER}/02042010.html

[code]....

View 3 Replies View Related

General :: How To Identify A HDD In A Server

Jun 6, 2011

Are there any identifiers on an HDD that can be either seen physically on a "sticker" on the HDD, and the same number/identifier could be read with software solutions?

I mean if I see with e.g.: S.M.A.R.T. that an HDD (in RAID) is failing, then I give out the command:

SOMEMAGIC

then I get an OUTPUT, e.g.: 9835923759237489

and then are ther any stickers on the HDD that has a label: 9835923759237489 ? so the hdd that has to be changed could be identified.

View 2 Replies View Related

General :: How To Identify Red Hat Version

Jul 18, 2011

I have a Red Hat Linux system that does not boot. The boot partition is damaged and files cannot be recovered.

I would like to know how to find out which version of Red Hat was installed from the program/data partition which is undamaged and accessible from Fedora Live CD. I assume this is available in a configuration file somewhere.

View 2 Replies View Related

General :: Identify Whether Process Is 32 / 64 Bit?

Dec 28, 2010

On my 64 bit Linux box, i have many processes which are 32 bit and some are 64 bit, how to identify which process is 32 bit and which is 64 bit?

View 2 Replies View Related

General :: Identify Pen Drive With 'blkid'?

Aug 21, 2010

I just 0 & 1'd a pen drive, and now I dont see it in 'blkid' output. Is there a way to know where the device is on the system, so that I can format it with a filesystem?

View 3 Replies View Related

General :: Identify Newly Installed O/s?

Aug 16, 2010

how to identify freshly installed linux o/s

View 7 Replies View Related

General :: Syslog Events To Identify Particular?

May 24, 2011

I know about syslog and /var/log/* log files but I don't know what kind of events means particular problem.

E.g.
- hardware issues (?)
- security problem (/var/log/security)

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved