LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-15-2002, 12:17 AM   #1
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
Tricks and hints


Jeremy, would you take for concideration to setup a *NIX tricks and hints secton, for instance I have a couple:
1) CDPATH env variable, if it is set for instance
[bash ~]$ export CDPATH=/usr/local/apache
when you enter from any directory you're in
[bash /var/log]$ cd htdocs
it will take you to /usr/local/apache/htdocs
2) !! at the command shell executes the last executed command
!m - executes the last command in history that starts with m for instance mail
!m (thsis is a colon p, not a smile face ) will print what was the last command that starts with m
mail
3) hitting twice z while holding a shift key in vi in command mode saves the edited file and quits vi
4) touch -t 197001012100 foo updates atime on foo to Jan 1 1970 you just need to add hhmm (2100)
5) man manpage|col -b>manpage.txt
is usefull to redirect a rather big man page to a text file in easy readable format
6) Getting rid off annoying ^M (CTRL-M) in dos like files
tr -d "\015" < /dosfile > /unixfile
also possible in use in vi with search-and-replace command :%s/^M//g to get ^M you press CTRL+V+M
To be continued ...
Regards, Neo

Last edited by neo77777; 08-15-2002 at 12:19 AM.
 
Old 08-15-2002, 01:37 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Hey thanks Boris, those are pretty sweet. I think something like that would be a great idea, maybe as a sticky in one of the forums. I will add this one to my subscribed threads though in case that idea never makes it.

Again, thanks!
 
Old 08-15-2002, 05:26 AM   #3
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Rep: Reputation: 30
i want a jokes forum *cries*
 
Old 08-15-2002, 08:12 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 10,421

Rep: Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628
Tips and tricks might not be a bad idea. Not sure if I would rather have a forum for this or a seperate section. Let me think about that. FYI, you can disable smilies in a post by clicking the "Disable Smilies in This Post " checkbox. Thanks for the suggestion.

--jeremy
 
Old 08-15-2002, 08:33 AM   #5
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 55
Hi, Jeremy it would be great, I think a separate section makes sense, also we can have a tip of the day or smtg along these lines.
P.S. And thatnks for the tip on disabling smilies, cool, I always descover something new over here even though this new has been here for a while.

Last edited by neo77777; 08-15-2002 at 08:36 AM.
 
Old 08-15-2002, 10:41 PM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 55
Here is another one, ever wonder what takes so much space on you precious *NIX box run this
find $1 -type d | xargs du -sm | sort -g
from the directory in question and the most hungry chunk will show up last.
 
Old 08-17-2002, 07:49 PM   #7
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
How about rather than giving a specific forum over to Tips 'n' Tricks, something like the Glossary/Man pages thing is set up? In order to prevent overloading of really-basic-everyone-already-knows-it tips, perhaps either a moderator could be appointed to remove any that are deemed to be stupidly simply, or as with the Glossary thing, the tips are emailed to Jeremy direct and He sifts through them and decides?

Just my 2 pence (we've not got the Euro... yet?)
 
Old 08-18-2002, 11:12 AM   #8
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
WHAT? I thought just about everyone over there had converted to the Euro. Like 12 something countries already right? This is about as far as my knowledge goes outside of my "sheltered" little existence over here in the US.

Cool
 
Old 08-18-2002, 06:34 PM   #9
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
Yeah, I think it's more like 15 (not sure... will check later). Even Eire (Southern Ireland/Republic of Ireland to everyone else) have gone over to the Euro, but us Englanders haven't yet. I'm betting that we will within the next 5 years, though.
 
Old 08-19-2002, 06:19 AM   #10
Config
Member
 
Registered: Jan 2001
Location: Switzerland
Distribution: Gentoo
Posts: 376

Rep: Reputation: 30
Good or bad: neither did switzerland
 
Old 08-19-2002, 06:57 AM   #11
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Well then... I thought everyone did or was going to by now, but it appears that I am sadly mistaken.
 
Old 08-19-2002, 09:06 AM   #12
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Nerither did Cymru (Wales)
 
Old 08-19-2002, 01:36 PM   #13
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
Dai, forgive me for asking, but is Wales considered a seperate country by the EU yet? This is not a flame... I know that Scotland is considered a seperate country, but I thought that Wales was considered as more of a partially-autonomic principality?
 
Old 08-20-2002, 02:18 AM   #14
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Hi Thymox I dont think we are classed as a seperate political state as of yet (We voted against it 52% to 48% I believe). Which Im glad about coz as much as I love my country I just dont think we would be able to sustain ourselves without being part of the UK. I mean some of these Assembly Members that we have as part of the devolution process dont really have much of a clue and are far more interested in minor issues than issues that affect the whole of the country. In principle it is good that we have more control over issues that affect our country, but I dont think our general assembly should be granted more powers until they can handle it.

Mind you I still love it when Wales beat England

Im just not one of those crazy people who think we should throw everybody who cant speak Welsh out of the country.

Last edited by dai; 08-20-2002 at 02:22 AM.
 
Old 08-21-2002, 02:49 PM   #15
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 55
Oohh, I love it when the discussion drifts off the topic . But here is another one, ever wonder you can learn perl right on your PC without going to online tutorials - install perl and perldoc (which is a part of perl)
type perldoc perl and see what you can get out of it.
Peace everyone.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wargame Hints? the_p0et Linux - Security 3 10-19-2003 11:04 PM
hints and tips bigjohn LQ Suggestions & Feedback 0 08-04-2003 01:48 PM
Slackware CUPS hints mi6 Slackware 3 06-05-2003 08:56 PM
Hints - process myquestion Programming 2 04-15-2002 07:26 PM
gcad hints ? jamaso Linux - General 0 03-02-2002 08:27 AM


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