LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 09-19-2008, 04:42 AM   #1
hillpigLQ
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
how to set redirect command can be wrote such as:$ ls > filelist.txt,are there


i know the redirect command can be wrote such as:$ ls > filelist.txt,are there any commands used to set the global redirect,so i don't need add each command >. thks
 
Old 09-19-2008, 08:59 PM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Use the 'alias' command. Create a new 'ls' alias.
For example:
# alias lls='ls > filelist.txt'

Look online for more help.
 
Old 09-19-2008, 09:55 PM   #3
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 329

Rep: Reputation: 140Reputation: 140
See:
The Advanced Bash-Scripting Guide
Example 19-2. Redirecting stdout using exec
http://tldp.org/LDP/abs/html/x16834.html
 
  


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
bash command for make difference between two txt file kkpal Linux - Newbie 7 05-12-2008 07:07 AM
scripting problem rm filelist milke Programming 9 07-07-2006 05:41 AM
How to redirect txt file to password input? saravkrish Linux - General 3 04-01-2006 02:23 AM
wine dc++ shuts down when trying to download or get filelist tudilica Linux - Software 3 04-18-2005 06:54 AM
Slackware's FILELIST.TXT DaHammer Slackware 5 09-26-2004 04:29 AM


All times are GMT -5. The time now is 11:39 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