LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-12-2012, 09:49 AM   #1
blaise77
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Rep: Reputation: Disabled
How to put modified files in directory


How do you put modified files in a directory/folder in home directory.
Is it '>'?
 
Old 12-12-2012, 09:54 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Are you asking how to redirect output from a program into a new file?
 
Old 12-12-2012, 10:41 AM   #3
blaise77
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
reply

yes please
 
Old 12-12-2012, 10:55 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Supposing you run the program "date" to tell you the time and date ... normally it shows on your screen.

Or you could do
Code:
date > eccles
to create a file called "eccles" (in your current directory) with that text in it.

Or
Code:
date > ~/eight_oclock
to create a file called "eight_oclock" (in your home directory) with that text in it.

http://www.hexmaster.com/goonscripts...ime_is_it.html
 
Old 12-12-2012, 11:03 AM   #5
mandyapenguin
Member
 
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 106

Rep: Reputation: Disabled
Quote:
Originally Posted by blaise77 View Post
yes please
See the I/O redirection
 
Old 12-12-2012, 11:04 AM   #6
blaise77
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by linosaurusroot View Post
Supposing you run the program "date" to tell you the time and date ... normally it shows on your screen.

Or you could do
Code:
date > eccles
to create a file called "eccles" (in your current directory) with that text in it.

Or
Code:
date > ~/eight_oclock
to create a file called "eight_oclock" (in your home directory) with that text in it.

http://www.hexmaster.com/goonscripts...ime_is_it.html

Folder has already been created. So hw do you direct output to the newly created folder/directory
 
Old 12-12-2012, 11:07 AM   #7
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by blaise77 View Post
Folder has already been created. So hw do you direct output to the newly created folder/directory
Show us the command you ran, with the output.
 
Old 12-12-2012, 11:22 AM   #8
blaise77
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
reply

Quote:
Originally Posted by linosaurusroot View Post
Show us the command you ran, with the output.
$ find . -mtime +1 -name '*as*'
./.#bashrc
./.bashrc~
./.bash_logout
./.bash_profile
./.bash_aliases
 
Old 12-12-2012, 11:34 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,534

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Quote:
Folder has already been created. So hw do you direct output to the newly created folder/directory
It's explained above by linosaurus root. You are just running the find command and getting output in the terminal. If you want it in a 'folder', you need to point it to the folder so add this to your command:

Quote:
> Folder/output
Replace Folder with whatever your folder name is and output with whatever file name you want. The above will work if the 'Folder' is in the same directory, otherwise you need the full path to it.
 
1 members found this post helpful.
  


Reply



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
gnu make recompiles the source files fully even though the files are not modified yasothamani Linux - Software 4 02-07-2007 06:36 AM
utility to update the last modified time of a directory RajRed Linux - Newbie 4 02-20-2006 04:34 PM
Tail Last Modified File in a Directory tyoungblood Linux - Software 3 08-12-2005 08:42 AM
Get directory stats when a file has been modified? marri Programming 2 05-13-2004 08:44 PM
Kickstart files put on http server directory ? Gates1026 Linux - General 0 01-27-2004 10:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:22 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
Open Source Consulting | Domain Registration