You are Here:
NEW High Spec Repository is LIVE



ls /dev

Author (Read 20466 times)

0 Members and 6 Guests are viewing this topic.

Re: ls /dev
« Reply #19 on: September 23, 2018, 11:32:51 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
"fsck the world"

I think that may be it.

My 2 cents...
"For the Win"

 8) 8) 8) 8)

I thought of this one too ;D

Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #18 on: September 23, 2018, 08:50:41 PM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1823
    Posts
  • Reputation: 281
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880

  • Kernel: 5.x
My 2 cents...
"For the Win"


 8) 8) 8) 8)
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express  -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2
 

Re: ls /dev
« Reply #17 on: September 23, 2018, 05:29:23 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
 "fsck the world"
 

Re: ls /dev
« Reply #16 on: September 23, 2018, 05:15:09 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
nano ftw :)

Sent from my Mobile phone using Tapatalk

What does ftw stand for @Jerry ? I googled for it and found some curious and fun meanings:

forget the world, for the worms, full throttle workshop, forever together whenever (this one I kind of like it :) ), face the world, florida tax watch, for the wolf,    Forschungszentrum Telekommunikation Wien, for the wii, for the weak, free the weed, fight to win, feel the wrath, for the win, follow the way, **** the world (I don't know why but I suspect this is it) and a few others.  ;D
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #15 on: September 23, 2018, 02:53:19 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8573
    Posts
  • Reputation: 795
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 6.0 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
nano ftw :)

Sent from my Mobile phone using Tapatalk

 

Re: ls /dev
« Reply #14 on: September 23, 2018, 02:45:52 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
@Moltke wrote: "text editor I use the most is nano, yeah nano all the way"
I agree. Use Nano a lot myself for BASH stuff, and whatever other editor is available depending on the OS when it's necessary to be out of the CLI, and I use only Gvim for other code bases like ruby and js. I don't know if it's an attempt at a teaching method, but in a lot of tutorials I see text editors recommended for basically no particularly important reason when nano would be the easiest. Small changes might as well use a small editor.

TC


@trinidad  Yeah, nano's the one I always use the most. I very often find myself typing
Code: [Select]
$ nano somefile in a terminal. I'm so used to it and have learned its key shortcuts...well most of them  8) Vim, Vi, Gvim I've always wanted to learn how to use Vi/Vim since I read a lot of articles claiming its not just one more editor but THE EDITOR LOL, but its "user unfriendliness" makes me always type the one Vi/Vim command I ever learnt :q!  ;D

@bitsnpcs I can only say: WOW! Nicely done girl! Like I said in a previous post I'm just learning how to create GUIs with python  ;D using those two programs I told you about.
« Last Edit: September 23, 2018, 02:51:30 PM by Moltke »
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #13 on: September 23, 2018, 01:57:41 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
Thank You @Moltke  :)   it is on Github, if you want, I made gui in way so I (and others) can make other GUI from this easily by copy/paste and edit.

Earlier I made some Gimp edits to try and better show how the thought image and book commands arrived in 1 thought. It took me a lot longer to try and do this.

Maybe it helps someone if it is interesting, it is not a project, or meant to be accurate, it is just showing the process of my thought as images when learning.


The image/thought was based on Systemback as this is the only backup software my eyes had seen.









The image didn't have the highlight, I just use it to show the description below of commands from book and the ideas of how I thought they might be able to be used from a beginner perspective, but likely wrong lol.

1 -  ls -t /directory/of/images       display image filenames of backups made of HOME at #3, and list by date order.

2 - ls /dev/sd*    output destination box, drop down menu for selection of sd* locations

3 - ??  needs command to create an image file from collection of HOME directory contents

4 - dd if=/dev/sdb of=flash_drive.img        need to change command to make image of entire OS not of the example flash_drive

5 - ??  run install media from #4

6 - dd if=input_file of=output_file [bs=block_size [count=blocks]]         where input file is output of/ or stored image of  #4

7 - sudo fsck /location/of/file system          file system check and repair

8 - sudo apt-get update
     sudo apt-get upgrade

9 - add embedded text window, mirroring the terminal output inside the GUI from #6 so any errors are visible.


@Moltke maybe now you can see why I said it was just thoughts based on the commands as I don't know enough to do this, many others would know though.
After the image thought, in popped its description thought -

"Bubl is a blend of LL, Cli, Python and Tk, cooked at 420F and seasoned with Love :) "
« Last Edit: September 23, 2018, 04:24:00 PM by bitsnpcs »
 

Re: ls /dev
« Reply #12 on: September 23, 2018, 11:31:01 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1395
    Posts
  • Reputation: 211
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 6.2 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
@Moltke wrote: "text editor I use the most is nano, yeah nano all the way"
I agree. Use Nano a lot myself for BASH stuff, and whatever other editor is available depending on the OS when it's necessary to be out of the CLI, and I use only Gvim for other code bases like ruby and js. I don't know if it's an attempt at a teaching method, but in a lot of tutorials I see text editors recommended for basically no particularly important reason when nano would be the easiest. Small changes might as well use a small editor.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: ls /dev
« Reply #11 on: September 23, 2018, 08:15:56 AM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
That GUI looks really good! Nice job @bitsnpcs  :)

Quote
No not trying to create anything at the moment, I am working through the book, "The Linux Command Line", unsure how many years ago I began it...You can get The Linux Command line as pdf free from the official site http://linuxcommand.org/tlcl.php
I see. I too started reading that book a while ago and for some reason stopped doing it, guess I got stuck at that moment. Thanks for the link by the way.

Quote
I use LL, and Gedit for Python coding
I used to use gedit too, then tried geany, they both are fine but then I discovered sublime text and find it really nice; lightwight, handy features, easy to use. In the past I've used kate even in windows 7, which is a great editor but now I try to avoid having those kde dependencies and who knows, sometimes I fell like installing it  ::)  Althought, the text editor I use the most is nano, yeah nano all the way. Now that I think of it, nano's the reason I never really care too much for text editors.


If you fell like trying sublime text, here are the steps for installing it:


First, open a terminal and type
Code: [Select]
$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -


Code: [Select]
$ echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

Code: [Select]
$ sudo apt-get update

Code: [Select]
$ sudo apt-get install sublime-text


Or, you can simply read more about it on its website http://www.sublimetext.com/


Cheers! :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #10 on: September 22, 2018, 09:07:48 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
Thank you for the links @Moltke  :)
No not trying to create anything at the moment, I am working through the book, "The Linux Command Line", unsure how many years ago I began it, I began to use Linux (Linux Lite right from the very start) 4 years ago from July 2018. But only started to use Linux and no Windows after a few of those years.
I learn some bits then do other things. When I feel ready then I learn some more. I am just beginning Chapter 17.

I use LL, and Gedit for Python coding, I then test the Python in the terminal before making the GUI, I build the GUI afterwards by editing and typing it in to the Python code in its file.
If you have not seen it this was my first completed Python app and GUI I made, I done it on LL using Gedit, Terminal, Python, and Tkinter. I am really pleased I was able to finish the first one because it will encourage me in future projects, not to give up easily.




Overall in the chapter of book I learned about the storage commands to -
1. make files or folders in to an image
2. command to burn that image/ISO
3. how to clone hard drive to another hard drive
4. how to view what occurs when device is added to the system.

Later that night I was listening to music and looking at the chapter index of contents for next few chapters, a future one is about "archives and backups", my mind thought, you have already learned about backup software, then the thought of commands 1thru 4 and how it may not be too difficult the extra things to learn to make this in Python into a backup software, for files/directories, cloning hard drives, and output it to external media, like portable hard drive or flash drive for files and directories.

Later I thought maybe as a stepping stone to that making an app GUI for burning ISO to disc, or saving to USB could be a practice run, but to make it final /usable gui on its own in case someone liked it or wanted to use it in part of another project.

It was just thoughts of the basic outline of what was needed.

You can get The Linux Command line as pdf free from the official site http://linuxcommand.org/tlcl.php
 

Re: ls /dev
« Reply #9 on: September 22, 2018, 04:10:03 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
Glad to help @bitsnpcs

Quote
What I was curious about, my motivation, was how a GUI only displays the most recently mounted storage device, as the output option field, or how to make a GUI do this and if I could use this command ls /dev/sd* by attaching it to a button in a GUI to achieve similar type of result.

Hmmm...I think you could achieve that in python. Are you trying to create/creating a GUI for some specific purpose? May I suggest this program: http://page.sourceforge.net/  I've been playing around with it since last August. It teaches you how to create GUIs using python. From it's website: "PAGE is a cross-platform drag-and-drop GUI generator, bearing a resemblance to Visual Basic. It allows one to easily create GUI windows containing a selection of Tk and ttk widgets. Required are Tcl/Tk 8.6 and Python 2.7+.  PAGE springs from Virtual Tcl, a Tcl/Tk program, forked to generate Python modules that realizes the desired GUI. Tcl is required for running PAGE but is not required for executing the generated Python code." It's not perfect though, I found a bug while using it and reported to it's developer. It seems that the created GUIs won't show properly under python 3.6 - some buttons aren't visible -  wich is the one installed in my system, I had to install python2 so it works as expected. Also, since I've read you're learning python - and so am I by the way  ;D - you might find insteresting this too: https://thonny.org/ it's a "python IDE for begginers" as advertised on its website. Both programs are really light on resources and download sizes are really low, less than 5mb both I think. Page runs as a script so there's no need to install anything. Instructions for installing Thonny are on the link above.

Hope you find this info helpful! :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #8 on: September 22, 2018, 10:26:43 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
I'm not sure what you're trying to do, but it seems that you want to ls into a usb stick?
Hope this helps! :)
@Moltke thank you  :) I have read the info on the link you gave me, it was helpful.

The answer by @supergamer is what I needed to know, I cannot mark things solved in this section of forum.

I am not trying to do something at this stage, just experimenting.

What I was curious about, my motivation, was how a GUI only displays the most recently mounted storage device, as the output option field, or how to make a GUI do this.
and
if I could use this command ls /dev/sd* by attaching it to a button in a GUI to achieve similar type of result.

I understand from @supergamer explanation why this did not work in the way I expected, and I also learned some new and useful information on the structure and use from you both. :)
 

Re: ls /dev
« Reply #7 on: September 22, 2018, 07:51:34 AM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1125
    Posts
  • Reputation: 126
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
Quote
As you can see I ran the code , I then inserted a USB stick and used up arrow on keyboard to reuse the same code and run it again, thus allowing for a comparison of before and after adding the USB stick.
It produced 2 new results the /dev/sdb and the /dev/sdb1 rather than the 1 new result I was expecting, why is this ?

@bitsnpcs  I'm not sure what you're trying to do, but it seems that you want to ls into a usb stick? if so, then I think the correct path would be run/media/bitsnpcs, like so:
Code: [Select]
$ ls /run/media/bitsnpcs and then your usb stick should appear in the list just like mine - MOK - does as you can see in the image bellow. 



You might want to read here: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/dev.html

Hope this helps! :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: ls /dev
« Reply #6 on: September 21, 2018, 09:52:10 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
Thank You @supergamer  :) for explaining .


 

Re: ls /dev
« Reply #5 on: September 21, 2018, 09:34:13 PM »
 

supergamer

  • Forum Regular
  • ***
  • 163
    Posts
  • Reputation: 27
  • Linux Lite Member

  • Linux Lite: 3.4 64bit

  • CPU: AMD Phenom 565

  • MEMORY: 12Gb

  • VIDEO CARD: 550 ti
Quote
As you can see I ran the code , I then inserted a USB stick and used up arrow on keyboard to reuse the same code and run it again, thus allowing for a comparison of before and after adding the USB stick.It produced 2 new results the /dev/sdb and the /dev/sdb1 rather than the 1 new result I was expecting, why is this ?



My understanding on why the 2 new devices might be rudimentary but it is how I keep things straight.


In the /dev folder it shows the devices as well as the partitions (partitions being treated as a devices also). So you see the /dev/sda (device) and the /dev/sda1 (partition) as well as the new devices like the new usb device which is /dev/sdb (device) and the partition /dev/sdb1 (partition)
« Last Edit: September 21, 2018, 09:36:14 PM by supergamer »
 

 

-->
X Close Ad

NEW High Spec Repository is LIVE