LinuxQuestions.org
Help answer threads with 0 replies.
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-20-2012, 05:59 AM   #1
unixor
Member
 
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
some questions


hello!

1) I want to be able to quickly see a specific photo, which would be the most convenient method? (least clicks, navigation, time, etc)

2) I have a list of commands that I want to run them sequencially, is there a way so that I wont have to copy/paste each in the bash?

3) after I type/paste a command in the bash (without hitting ENTER to run it), is there a way to delete it with one click?

thanks!
 
Old 09-20-2012, 06:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
please use useful thread titles. "some questions" leaves a lot to be desired.

1) erm.. huh? context..??

2) very vague again. do you just want "command1; command2; command3" ?

3) ctrl+u
 
Old 09-20-2012, 06:23 AM   #3
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,674
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by unixor View Post
2) I have a list of commands that I want to run them sequencially, is there a way so that I wont have to copy/paste each in the bash?
Copy paste all those commands in a file. Give the file executable
permissions with chmod.
Run the file as ./filename.

Quote:
Originally Posted by unixor View Post
3) after I type/paste a command in the bash (without hitting ENTER to run it), is there a way to delete it with one click?
Ctrl u works indeed, but you can simply press Ctrl c and get
a new prompt.
 
Old 09-20-2012, 06:36 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Of course "ctrl + u" is two clicks. A single click is to hold down backspace...
 
Old 09-20-2012, 06:47 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,674
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
u is farther than c for my left hand.
I'd prefer Ctrl c rather.
 
Old 09-20-2012, 12:47 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,603
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Member Response

Hi,

Quote:
Originally Posted by unixor View Post
hello!

1) I want to be able to quickly see a specific photo, which would be the most convenient method? (least clicks, navigation, time, etc)
If you are talking about DE or WM then place a shortcut on the Desktop.

Quote:
Originally Posted by unixor View Post
2) I have a list of commands that I want to run them sequencially, is there a way so that I wont have to copy/paste each in the bash?
You can use user defined aliases in your '~/.bashrc' file and use the console or launch 'X' alias to do something; You could setup a .bashrc & .bash_profile for your user;
Code:
sample .bash_profile;
  
 ~$ cat .bash_profile
 # .bash_profile
 #08-30-06 12:21
 #
 # Source .bashrc
 if [ -f ~/.bashrc ]; then
         . ~/.bashrc
 fi
Quote:
Code:
 sample .bashrc;
 :~$ cat .bashrc
  
 #.bashrc
 #08-30-06 12:20  
  
 # Add bin to path
  
 export PATH="$PATH:/sbin:/usr/sbin:$HOME/bin"
  
 #export PATH="$PATH:$HOME/bin"
  
 # Dynamic resizing
 shopt -s checkwinsize
  
# Custom prompt
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  
 #08-29-06 11:40
  
 if [ `id -un` = root ]; then
    PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
  else
    PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] '
 fi
 #
 # Add color
 eval `dircolors -b`
  
 # User defined aliases
 alias cls='clear'
 alias clls='clear; ls'
 alias ll='ls -l'
 alias lsa='ls -A'
 alias lsg='ls | grep'
 alias lsp='ls -1 /var/log/packages/ > package-list'
 alias na='nano'
 alias web='links -g -download-dir ~/ www.google.com'
  
 #08-29-06 11:50
  
 #To clean up and cover your tracks once you log off
 #Depending on your version of BASH, you might have to use
 # the other form of this command
    trap "rm -f ~$LOGNAME/.bash_history" 0
 

 #The older KSH-style form
 #   trap 0 rm -f ~$LOGNAME/.bash_history
The .bashrc is very useful!
Quote:
Originally Posted by unixor View Post
3) after I type/paste a command in the bash (without hitting ENTER to run it), is there a way to delete it with one click?

thanks!
I do use 'ctrl-c' but if you are on the command line then press and hold <backspace>. Plus remember that the lines are editable by using the cursor keys 'left arrow' & 'right arrow' to move on line to edit. You can move through history with the 'up & down' arrows on the cli.

Just a few more links to aid you to gaining some understanding. Sure some may seem beyond a newbie but you must start somewhere;



Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Bash Beginners Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Home Networking



The above links and others can be found at '
Slackware-Links'. More than just SlackwareŽ links!
 
  


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
New Linux user with a few questions - Networking and Drivers questions Techsniffer Linux - Newbie 9 04-04-2012 01:21 PM
Make questions and ARCH questions for gentoo/calculate linus72 Calculate 5 04-09-2010 01:53 AM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
LXer: Questions Answered, Questions Posed - What Happened? LXer Syndicated Linux News 0 05-14-2007 03:46 PM
window manager questions and/or theme questions t3gah Linux - Software 2 02-27-2005 05:16 PM


All times are GMT -5. The time now is 12:53 AM.

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