LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2014, 02:44 PM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Post Disable shell , force bash


Hello all.
I read in a book bellow command for "Disable shell , force bash" but command not work :

chmod -50 tcsh/csh/ksh

Can you tell me what is the real command?

Cheers.
 
Old 09-28-2014, 03:58 PM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,527

Rep: Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439
see man page of chmod
 
Old 09-28-2014, 04:02 PM   #3
rigor
Member
 
Registered: Sep 2011
Posts: 218

Rep: Reputation: Disabled
Hi jokar.mohsen!

It depends on the situation.

If right now I used the chsh command to choose a shell, then after I login the next time, the chosen shell would be the shell into which I'd be typing commands on the command line.

If you are a system administrator, you have nothing installed that requires tcsh or ksh, and you don't want tcsh or ksh used, ever, you can just not install them, or if they are already installed, then un-install tcsh and ksh.

If tcsh and ksh are in /bin and you temporarily don't want them used, no system facility requires tcsh or ksh to run, I suppose you could use this command:

Code:
chmod  0  /bin/tcsh  /bin/ksh
But if you are going to want those shells to be used sometime later, you'd want to make sure that you know what the correct permissions are, to change them back later.

HTH.
 
Old 09-28-2014, 04:27 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Or chmod -0111 or just chmod -x
(re-enable : chmod +x)

Last edited by keefaz; 09-28-2014 at 04:29 PM.
 
Old 09-29-2014, 02:35 PM   #5
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Can you correct this command for me :

find -i -name file -type .pdf

I should find PDF files.
 
Old 09-29-2014, 02:38 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,116

Rep: Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531
yes.

To find pdf files in the current directory...

Code:
find . -type f -name '*.pdf'
Not sure what you were trying to do with -i, never seen it before.
 
Old 09-29-2014, 09:14 PM   #7
rigor
Member
 
Registered: Sep 2011
Posts: 218

Rep: Reputation: Disabled
If the -i was intended to make the search case insensitive like the -i option would with grep, then for find what you want is:

Code:
find . -type f -iname '*.pdf'
Also,
Code:
man find
produces output that is search-able. If you wanted to know which option will have find work in a case-insensitive way, you can use the slash character / to cause a search through the man page for words like case or insensitive. The manual page can be searched for words that could describe whatever option you might need.

HTH.

P.S. Aren't we getting a bit off the thread topic?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I force y/n answer in bash? abefroman Programming 2 09-16-2013 06:29 PM
ssh from solaris 9 with a bash shell of 2.0 to suse 3.2 bash shell slufoot80 Solaris / OpenSolaris 3 09-19-2012 04:06 PM
ssh from solaris 9 with a bash shell of 2.0 to suse 3.2 bash shell slufoot80 Solaris / OpenSolaris 1 09-19-2012 02:19 PM
how to disable force options in linux commands iamjayanth Linux - Security 5 06-09-2009 08:51 PM
Force xorg to use specific monitor resolution / disable DDC? slacky Linux - Hardware 3 09-19-2008 09:47 AM


All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration