1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hardware Linux CLI 101

Discussion in 'Article Discussion' started by CardJoe, 6 Sep 2007.

  1. pendragon

    pendragon I pickle they

    Joined:
    14 May 2004
    Posts:
    717
    Likes Received:
    0
    interesting article, though I was already familiar with most of it... one thing though, I just ran into recently ... I was looking for a way to list files similar to the 'dir -p' structure with DOS .. thus I did ls -l .. however that doesn't break results into 'pages' ..i tried 'man ls' , however I failed to see any result-chopping arguements in there.. anyone got an idea about that?
     
  2. DougEdey

    DougEdey I pwn all your storage

    Joined:
    5 Jul 2005
    Posts:
    13,933
    Likes Received:
    33
    It's something I've never worked out, there's nothing in the man page either. I just use page up/down to scroll results (sometimes hold down shift or ctrl to scroll)
     
  3. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Hmm, I don't think ls has such a switch... Don't even think ls is aware of terminal size...

    Code:
    ls | less
    does the trick tough
     
  4. Woodstock

    Woodstock So Say We All

    Joined:
    10 Sep 2006
    Posts:
    1,783
    Likes Received:
    2
    does this include the newer sata optical drives?
     
  5. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    /dev/cdrom is a symlink created by udev towards the cdrom drive.

    For example, on my laptop, /dev/hda is my primary drive, and /dev/hdc is my cdrom
    Code:
    laptop ~ # ls -al /dev/cdrom 
    lrwxrwxrwx 1 root root 3 Sep  6 17:32 /dev/cdrom -> hdc
    So yes, they should be there ;)
     
  6. 1e8o

    1e8o New Member

    Joined:
    13 Oct 2005
    Posts:
    272
    Likes Received:
    0
    Hahahah LOL, I just figured that there was a software tab :p didn't even look. And I'm allmost a 2 year member :D
     
  7. completemadness

    completemadness New Member

    Joined:
    11 May 2007
    Posts:
    887
    Likes Received:
    0
    i believe so, but like an IDE CD Rom, there will also be a /dev/sdX for the drive as well

    Its different by default, but on windows if you
    ping ad.dr.es.ss -t
    it works the same way as on Linux

    I also think a quick mention of the --help switch would have been a good idea, man is much more comprehensive, but most of the time, i find its overkill, --help is a much easier way to find what your looking for

    Definitely a good guide though, and there are a couple of titbits in there even for someone who has used Linux quite a bit (like me :p)

    P.S. i think you should redo your server part 1 guide in the CLI, using the ubuntu server (or alternate ?) CD, especially the bit on using VNC (Xauth on CLI i believe) instead of having to run a full blown desktop manager :)
     
  8. [cibyr]

    [cibyr] Sometimes posts here

    Joined:
    30 Nov 2003
    Posts:
    749
    Likes Received:
    1
    A pretty good guide, but there's definitely a few things needed in part two:

    pipes
    which
    bash history, and searching through it (probably the only thing that's easier in ksh)
    killall
    grep
    lynx
    and maybe an explanation of ^C/^Z/jobs/etc
     
  9. Jamie

    Jamie ex-Bit-Tech code junkie

    Joined:
    12 Mar 2001
    Posts:
    8,180
    Likes Received:
    54
    You must take a look at Ruby, it's probably the nicest language to code in ever.
     
  10. SyxPak

    SyxPak New Member

    Joined:
    16 Apr 2004
    Posts:
    25
    Likes Received:
    0
    user@host:~# man <command>
    user@host:~# apropos <word related to what you wish to do>

    www.tldp.org - The Linux Documentation Project, some things are out-dated either because they're no-longer/poorly maintained or the software or method has been deprecated by something newer and hopefully better :)
    www.howtoforge.org - Good guides on alot of real-world stuff.
    http://ubuntuforums.org/ - Helpful, if a little ubuntu-specific.
    http://windows-get.sourceforge.net/ - you'll like this

    Debian is GNU/Linux. Militant hippies on a mission. Only includes free software by default, though things called apt repositories can make other stuff available.
    Which is what Ubuntu have done, with funding from Canonical. Emo.
    FreeBSD is cool. Great handbook. Loads of stuff available, everything is compiled for your machine.
    Gentoo is the Linux implementation of the FreeBSD style.
    OpenBSD is ninja. Gifted OpenSSH to the world. Praise be Theo de Raadt

    There are loads more distros, for other platforms aside from x86/x86_64.
    http://distrowatch.com/

    www.bash.org - Funny. Join in the fun.
    Read a wiki on the history of UNIX and computing.
    Now repeat your wiki-ing here.
    Book.
    Watch Revolution OS, or buy it.
     
  11. David_Fitzy

    David_Fitzy I modded a keyboard once....

    Joined:
    8 Jan 2004
    Posts:
    206
    Likes Received:
    2
    Forget PERL, Ruby, Python, Java, C. When are we going to get bottom up kernal coding 101 (in binary)?!:lol:

    Thanks for the article I've dabbled a bit in the CLI I love apt-get install over synaptic install so I must be on the right track :)
     
  12. steveo_mcg

    steveo_mcg New Member

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    Just installed htop, what a difference. Excellent recommendation!
     
    Last edited: 8 Sep 2007
  13. Greenie

    Greenie New Member

    Joined:
    15 Sep 2005
    Posts:
    58
    Likes Received:
    0
    nice article, hopefully people reading these linux articles will get interested in the possibilities and exercise a choice over the OS they run
     
  14. Woodstock

    Woodstock So Say We All

    Joined:
    10 Sep 2006
    Posts:
    1,783
    Likes Received:
    2
    is there a command to display battery info (time remaining, pluged in, percent remaining etc), if so please share the love
     
  15. DougEdey

    DougEdey I pwn all your storage

    Joined:
    5 Jul 2005
    Posts:
    13,933
    Likes Received:
    33
    Code:
    cat /proc/acpi/battery/BAT0/info
    
    cat /proc/acpi/battery/BAT0/state
    
    Those two should give you the basic info, I know that my battery should run at 4300mAh capacity but is actually running at 1460mAh (really need to buy a new one!)
     
  16. cedel

    cedel New Member

    Joined:
    23 Jan 2007
    Posts:
    3
    Likes Received:
    0
    A nice article, describing some of the basics.

    There is also a nice program I think might make it a bit easier for Linux CLI newbies - Midnight Commander. Being the original Norton Commander clone (well, not purely CLI), it saved my ..... (fill in what suits your imagination) a couple of times, when the X server wouldn't start.
     
  17. Dirge

    Dirge New Member

    Joined:
    12 Jun 2004
    Posts:
    11
    Likes Received:
    0
    I understood these commands perfectly but I am not that far removed from a newbie. I can imagine how hard some of this article would be to follow for someone completely new. Great to see a Linux article, looking forward to more.
     
  18. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    I have a challenge for you. Write 'echo hello' in BrainF*ck (yes, that actually IS a language)

    +++[>+++[>++++[>>++<<-]<-]<-]+++++[>++++
    +[>>>>++++<<<<-]<-]>>>>>+<<<<<++++[>+++[
    >+++[>>>>+++>+++>>>>>>>+++<<<<<<<<<<<<-]
    <-]<-]++++[>+++[>+++[>>>>>>+++>>>>+++<<<
    <<<<<<<-]<-]<-]>>>>>>>>+++>>>>+++<<<<<<<
    <<<<<++++[>>>>>>>>>+++++++++++<<<<<<<<<-
    ]++++[>++++[>>>>>>>>>++<<<<<<<<<-]<-]+++
    ++[>++++[>+++[>>>>>>>>>++<<<<<<<<<-]<-]<
    -]>>>>>>>>>>>-<<<<<<<<<<<+++++++++++++++
    ++++[>+++[>>>>>>>>>>>>++<<<<<<<<<<<<-]<-
    ]+++++[>+++++[>>>>>>>>>>>>>>++++<<<<<<<<
    <<<<<<-]<-]+++[>>>>>>>>>>>>>>>>+++++++++
    ++<<<<<<<<<<<<<<<<-]>>>>[.>]
     
  19. Hamish

    Hamish New Member

    Joined:
    25 Nov 2002
    Posts:
    3,649
    Likes Received:
    4
    as powerful as a CLI like bash is filemanagement in it never fails to drive me absolutely spare :p
    right now i have 3 explorer windows open
    fileserver, local incoming and other

    drag and drop (especially with right click + drag) >>>>>> cli commands for 90% of stuff imo

    im quite comfortable with bash when i use linux, but good god do i miss windows explorer :(
     
  20. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    By the time you have opened explorer and 'browsed' to the right directory I've copied (maybe renamed if I'm in a good mood) an entire directory to somewhere else :) But I get your point, sometimes a GUI comes in handy. Why doesn't Bash completion work in GUI ;)
     
Tags: Add Tags

Share This Page