LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-06-2011, 08:17 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,200

Rep: Reputation: Disabled
How to open files in MC as root without typing in their names?


Hello people!

So let's say I entered some dir in MC as a regular user and there is a file with very long name which is not convenient to spell and I want to edit it with nano as root. In this directory I type in a command "sudo nano [name]" and autocompletion doesn't work because the TAB key is for another purpose in MC. Can I insert a name of selected file without typing it in MC?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-07-2011, 01:36 AM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 390

Rep: Reputation: 150Reputation: 150
Select the file and press Alt-Enter.
 
2 members found this post helpful.
Old 07-07-2011, 01:58 AM   #3
rahulkya
Member
 
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
I am not sure but this may help you lets suppose you have 3 long file name in the directory
1. trryskshsjdbfhsbhjbshjbgsjhbjshbgjhbsjgsgb.ext
2. trstyxbvjhbxkjvxjhbxhjbjxhbjxhjhbxvjhbjxhbjsgbsjhgbjshbgj.ext2
3. trysjhbjhsbgjhbsghjbsjbgjsbgjhbsjghbjsgjsjhbhjbsfhjbghjbsghjbgjshgbhjsbghjbjsghbghjbsjg.ext3

and you have to edit 3rd file then write command like this
Quote:
sudo nano trys*t3
and if u have to edit 1st file then just this would be enough
Quote:
sudo nano trr*
the wild character * does the rest.
 
Old 07-10-2011, 02:55 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,200

Original Poster
Rep: Reputation: Disabled
Thanks rahulkya, first answer did the job.
 
  


Reply

Tags
mc, root, sudo


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
can't access internet when typing in names bioalchemist Linux - Networking 2 11-12-2006 10:33 AM
shortcut for typing long names karan101 Linux - Software 3 01-12-2005 02:54 PM
Konqueror as root: files names : Horrible nanar12 Linux - Software 1 04-27-2004 03:56 AM
SAMBA: display of share names is OK but files names are wrong superandrzej Linux - Software 5 02-02-2004 09:14 AM
get kick out everytime typing in the root and password visioning Linux - Security 13 08-28-2003 04:31 PM


All times are GMT -5. The time now is 05:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration