QUOTE(ceciliatang95 @ Oct 18 2021, 08:36 AM)
... logrotate, plz, kthxbye.Any interesting commands in Linux?
Any interesting commands in Linux?
|
![]() |
![]() ![]() ![]() ![]() ![]()
Junior Member
560 posts Joined: Jul 2006 ![]() |
QUOTE(ceciliatang95 @ Oct 18 2021, 08:36 AM) ... logrotate, plz, kthxbye. |
|
|
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]()
Junior Member
889 posts Joined: Jan 2016 ![]() ![]() |
command -v is better than which angch liked this post
|
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,870 posts Joined: Aug 2009 From: Shithole Klang ![]() |
fish The day i discovered and chsh to fish was the day my productivity instantly jumped by 200% This post has been edited by failed.hashcheck: Nov 12 2021, 08:17 PM ceciliatang95 liked this post
|
|
![]()
Show posts by this member only | IPv6 | Post
#24
|
![]() ![]() ![]() ![]()
Junior Member
314 posts Joined: Sep 2006 From: KL ![]() ![]() ![]() |
Do search on 'Top 10 Linux Command'
![]() |
|
![]()
Show posts by this member only | IPv6 | Post
#25
|
![]() ![]() ![]() ![]() ![]()
Validating
515 posts Joined: Nov 2020 ![]() |
Learn ANSI escape code for coloring!!!
256-color terminal window: https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit Example command to type in Linux bash shell: (Notice the -e switch) CODE $ echo -e "\e[48:5:40mThis was fun" ![]() The rules are: CODE ESC[38:5:⟨n⟩m Select foreground color ESC[48:5:⟨n⟩m Select background color where n is a number from the table below |
|
![]()
Show posts by this member only | IPv6 | Post
#26
|
![]() ![]() ![]() ![]() ![]()
Validating
515 posts Joined: Nov 2020 ![]() |
Recently, I reinstalled my PC with Windows 10. And one strange difference where I notice, "Audacious" MP3 player in Debian 11, its music is poorly played if compared to "Groove Music" MP3 player in Windows 10.
This "Groove Music" in Windows 10 has better sound effect when playing MP3 songs than "Audacious" in Debian 11. I thought every music player is the same, looks like I am wrong. |
|
![]() |
![]() ![]() ![]()
Junior Member
175 posts Joined: Aug 2021 ![]() ![]() |
QUOTE(FlierMate @ Feb 16 2022, 04:59 PM) Recently, I reinstalled my PC with Windows 10. And one strange difference where I notice, "Audacious" MP3 player in Debian 11, its music is poorly played if compared to "Groove Music" MP3 player in Windows 10. Different browser (even different version) perform differently.This "Groove Music" in Windows 10 has better sound effect when playing MP3 songs than "Audacious" in Debian 11. I thought every music player is the same, looks like I am wrong. Different programming language target different situation. So it also applied to media player. There is no one size fit all solution. P/S : One of my favorites media player is vlc, which used lua language for extensions. ![]() |
|
![]()
Show posts by this member only | IPv6 | Post
#28
|
![]() ![]() ![]()
Validating
139 posts Joined: Jun 2022 ![]() |
Recently someone teaches me to use "find" command.
Code $ find /usr/lib -name 'python*' /usr/lib/python3.8 /usr/lib/python3.9 /usr/lib/valgrind/python3.supp /usr/lib/python3 /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/python.cpython-38.pyc /usr/lib/python3/dist-packages/sos/report/plugins/python.py /usr/lib/python3/dist-packages/twisted/python /usr/lib/python3/dist-packages/python_apt-2.0.0+ubuntu0.20.4.7.egg-info /usr/lib/python3/dist-packages/python_debian-0.1.36ubuntu1.egg-info /usr/lib/python2.7 $ The "find" command to search for a filename pattern in all subdirectories: CODE find /usr/lib -name 'python*' ---- Actually "locate" command is more powerful, but you need to install it separately: CODE sudo apt install mlocate Then, just type "locate" command followed by the filename you want to search, no need to define directory name, it will search the entire drive: CODE locate python This post has been edited by FlierMate1: Jul 16 2022, 08:09 PM |
|
|
|
![]() |
![]() ![]() ![]() ![]() ![]()
Junior Member
560 posts Joined: Jul 2006 ![]() |
QUOTE(angch @ Oct 3 2021, 11:53 AM) fd. Better find than find. https://github.com/sharkdp/fdCODE angch@server:~$ time find . -iname "*.pdf" >/dev/null real 0m2.442s user 0m0.945s sys 0m1.489s angch@server:~$ time fdfind '.pdf$' >/dev/null real 0m0.202s user 0m1.788s sys 0m2.093s fd is *much* faster, without indexing. Colour coded too. And fd's -exec runs the commands in parallel, no need to pipe to GNU parallel. On Ubuntu: CODE sudo apt install fd-find This post has been edited by angch: Jul 17 2022, 09:21 PM FlierMate1 liked this post
|
|
![]()
Show posts by this member only | IPv6 | Post
#30
|
![]() ![]() ![]()
Validating
139 posts Joined: Jun 2022 ![]() |
I have a question regarding "install" command.
Actually both lines are same, but then why there is "install" command? CODE $ install myapp /usr/local/bin CODE $ cp myapp /usr/local/bin I do not quite understand. Any help? |
|
![]() |
![]() ![]() ![]() ![]() ![]()
Junior Member
560 posts Joined: Jul 2006 ![]() |
It's a legacy GNU coreutils thing.
Just ignore and use CODE cp like everyone.Use CODE man install to rtfm the difference.This post has been edited by angch: Jul 19 2022, 09:46 PM |
|
![]()
Show posts by this member only | IPv6 | Post
#32
|
![]() ![]() ![]()
Validating
139 posts Joined: Jun 2022 ![]() |
|
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]()
Junior Member
889 posts Joined: Jan 2016 ![]() ![]() |
QUOTE(FlierMate1 @ Jul 19 2022, 08:06 PM) I have a question regarding "install" command. as a package maintainer,Actually both lines are same, but then why there is "install" command? CODE $ install myapp /usr/local/bin CODE $ cp myapp /usr/local/bin I do not quite understand. Any help? "install" can function like "mkdir -p", "cp -r", "chmod some-permission" in one line dont think "cp" alone can do that... FlierMate1 liked this post
|
|
![]() |
![]() ![]()
Junior Member
42 posts Joined: Jul 2022 ![]() |
interesting...
|
|
|
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,604 posts Joined: Jun 2006 ![]() ![]() |
ripgrep 'rg'. Faster than normal grep
|
|
![]()
Show posts by this member only | IPv6 | Post
#36
|
![]() ![]()
Validating
12 posts Joined: Sep 2022 ![]() |
I always like the idea of listing detailed info about current directory, with file size and file attributes and all that, but I always find I cannot use "ll" command on Debian 11 / 10. I have no choice, to use "ls -l" instead which is longer to type.
CODE boo@debian:~/Downloads$ ll bash: ll: command not found boo@debian:~/Downloads$ ls -l total 768 -rw-r--r-- 1 boo boo 124 Jul 24 20:50 1.txt -rw-r--r-- 1 boo boo 63 Jul 24 21:00 2.txt -rw-r--r-- 1 boo boo 61 Jul 24 21:04 3.txt -rw-r--r-- 1 boo boo 280 Aug 11 16:55 4.txt -rw-r--r-- 1 boo boo 85 Aug 18 18:12 5.txt -rw-r--r-- 1 boo boo 22 Sep 6 15:52 6.txt -rw-r--r-- 1 boo boo 742478 Sep 2 22:54 earth.avi But on WSL (Ubuntu 20.04), I can use "ll" command without problem. CODE boo@IdeaPad3:/mnt/c/Users/bookh/Downloads$ ll total 4493144 drwxrwxrwx 1 boo boo 4096 Sep 6 15:53 ./ drwxrwxrwx 1 boo boo 4096 Jul 11 04:17 ../ -rwxrwxrwx 1 boo boo 151980 Sep 6 15:53 'Screenshot 2022-09-06 155320.png'* -r-xr-xr-x 1 boo boo 4600823808 Jun 30 15:17 Windows.iso* -rwxrwxrwx 1 boo boo 282 May 18 14:16 desktop.ini* Does anyone know why? |
|
![]()
Show posts by this member only | IPv6 | Post
#37
|
![]() ![]() ![]()
Junior Member
178 posts Joined: Apr 2022 ![]() |
QUOTE(FlierMateI @ Sep 6 2022, 04:08 PM) I always like the idea of listing detailed info about current directory, with file size and file attributes and all that, but I always find I cannot use "ll" command on Debian 11 / 10. I have no choice, to use "ls -l" instead which is longer to type. jesus, new account again?CODE boo@debian:~/Downloads$ ll bash: ll: command not found boo@debian:~/Downloads$ ls -l total 768 -rw-r--r-- 1 boo boo 124 Jul 24 20:50 1.txt -rw-r--r-- 1 boo boo 63 Jul 24 21:00 2.txt -rw-r--r-- 1 boo boo 61 Jul 24 21:04 3.txt -rw-r--r-- 1 boo boo 280 Aug 11 16:55 4.txt -rw-r--r-- 1 boo boo 85 Aug 18 18:12 5.txt -rw-r--r-- 1 boo boo 22 Sep 6 15:52 6.txt -rw-r--r-- 1 boo boo 742478 Sep 2 22:54 earth.avi But on WSL (Ubuntu 20.04), I can use "ll" command without problem. CODE boo@IdeaPad3:/mnt/c/Users/bookh/Downloads$ ll total 4493144 drwxrwxrwx 1 boo boo 4096 Sep 6 15:53 ./ drwxrwxrwx 1 boo boo 4096 Jul 11 04:17 ../ -rwxrwxrwx 1 boo boo 151980 Sep 6 15:53 'Screenshot 2022-09-06 155320.png'* -r-xr-xr-x 1 boo boo 4600823808 Jun 30 15:17 Windows.iso* -rwxrwxrwx 1 boo boo 282 May 18 14:16 desktop.ini* Does anyone know why? TruboXL liked this post
|
|
![]() |
![]() ![]() ![]() ![]() ![]()
Junior Member
560 posts Joined: Jul 2006 ![]() |
Alien Life Form? ALF? CODE # some more ls aliases alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' https://gist.github.com/marioBonales/1637696 TruboXL and FlierMateI liked this post
|
|
![]()
Show posts by this member only | IPv6 | Post
#39
|
![]() ![]()
Validating
17 posts Joined: Jul 2022 ![]() |
The following common Linux terminal commands are for students especially those playing with Raspberry Pi OS.
QUOTE sudo = "put this in front of any commands, execute that particular commands as a 'SuperUser' (root)" cd = "Change Directory (Folder)" ls = "List all files and folders in current directory" mkdir = "Create a new folder in current directory" rm and rmdir = "Delete files and Delete folders" wget = "Download anything from the internet using source links" nano = "Use a built-in text editor Nano to display and edit any text files" Taken from Cytron tutorial. |
|
![]()
Show posts by this member only | IPv6 | Post
#40
|
![]() ![]() ![]()
Junior Member
87 posts Joined: Dec 2008 From: Houston, TX ![]() ![]() |
CODE sudo !! is one I use alot. Every time I go duh! I forgot to sudo.CODE ❯ whoami user1 ❯ sudo !! ❯ sudo whoami Password: root Fraus liked this post
|
Change to: | ![]() ![]() ![]() ![]() Time is now: 4th February 2023 - 01:10 AM |