- 3 Posts
- 21 Comments
A book without it? I couldn’t show the world a short post not including it! Why though? This is so hard for our brains. 💀
ClusterBomb@lemmy.blahaj.zoneto
Privacy@lemmy.ml•Let's be honest, if Microsoft failed Linux Phones will failEnglish
8·3 months agoI’d be interested in the lottery numbers if you can get them for me.
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•30 interesting commands for the Linux shellEnglish
0·7 months ago- Supervise command (run every 2s)
watch "ls -larth"- Kill program using one port
sudo fuser -k 8000/tcp- Limit memory usage for following commands
ulimit -Sv 1000 # 1000 KBs = 1 MB ulimit -Sv unlimited # Remove limit- Rename selected files using a regular expression
rename 's/\.bak$/.txt/' *.bak- Get full path of file
readlink -f file.txt- List contents of tar.gz and extract only one file
tar tf file.tgz tar xf file.tgz static- List files by size
ls -lS- Nice trace route
mtr google.com- Find files tips
find . -size 20c # By file size (20 bytes) find . -name "*.gz" -delete # Delete files find . -exec echo {} \; # One file by line ./file1 ./file2 ./file3 find . -exec echo {} \+ # All in the same line ./file1 ./file2 ./file3- Print text ad infinitum
yes yes hello- Who is logged in?
w- Prepend line number
ls | nl- Grep with Perl like syntax (allows chars like \t)
grep -P "\t"- Cat backwards (starting from the end)
tac file- Check permissions of each directory to a file
It is useful to detect permissions errors, for example when configuring a web server.
namei -l /path/to/file.txt- Run command every time a file is modified
while inotifywait -e close_write document.tex do make done- Copy to clipboard
cat file.txt | xclip -selection clipboard- Spell and grammar check in Latex
detex file.tex | diction -bsYou may need to install the following: sudo apt-get install diction texlive-extra-utils.
- Check resources’ usage of command
/usr/bin/time -v ls- Randomize lines in file
cat file.txt | sort -R cat file.txt | sort -R | head # Pick a random sambple# Even better (suggested by xearl in Hacker news):
shuf file.txt- Keep program running after leaving SSH session
If the program doesn’t need any interaction:
nohup ./script.sh &If you need to enter some input manually and then want to leave:
./script.sh <Type any input you want> <Ctrl-Z> # send process to sleep jobs -l # find out the job id disown -h jobid # disown job bg # continue running in the backgroundOf course, you can also use screen or tmux for this purpose.
- Run a command for a limited time
timeout 10s ./script.sh# Restart every 30 minutes
while true; do timeout 30m ./script.sh; done- Combine lines from two sorted files
comm file1 file2Prints these three columns:
Lines unique to file1. Lines unique to file2. Lines both in file1 and file2.With options -1, -2, -3, you can remove each of these columns.
- Split long file in files with same number of lines
split -l LINES -d file.txt output_prefix- Flush swap partition
If a program eats too much memory, the swap can get filled with the rest of the memory and when you go back to normal, everything is slow. Just restart the swap partition to fix it:
sudo swapoff -a sudo swapon -a- Fix ext4 file system with problems with its superblock
sudo fsck.ext4 -f -y /dev/sda1 sudo fsck.ext4 -v /dev/sda1 sudo mke2fs -n /dev/sda1 sudo e2fsck -n <first block number of previous list> /dev/sda1- Create empty file of given size
fallocate -l 1G test.img- Manipulate PDFs from the command line
To join, shuffle, select, etc. pdftk is a great tool:
pdftk *.pdf cat output all.pdf # Join PDFs together pdftk A=in.pdf cat A5 output out.pdf # Extract page from PDFYou can also manipulate the content with cpdf:
cpdf -draft in.pdf -o out.pdf # Remove images cpdf -blacktext in.pdf -o out.pdf # Convert all text to black color- Monitor the progress in terms of generated output
# Write random data, encode it in base64 and monitor how fast it is being sent to /dev/null
cat /dev/urandom | base64 | pv -lbri2 > /dev/null # pv options: # -l, lines # -b, total counter # -r, show rate # -i2, refresh every 2 seconds- Find packages that have a given file in Ubuntu
apt-file update apt-file search dir/file.h
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•Why Vim Is More than Just an Editor – Vim Language, Motions, and Modes ExplainedFrançais
0·7 months agoI started using PyCharm recently. I love being able to open and switch multiple terminals, access database, see code structure, tooltip on deprecated code and how to fix it, I also like jumping to declarations, inserting code snippets.
Could I do all of these too with vim or neovim?
Kinda long to read : https://d-shoot.net/kagi.html
I used to but people behind are bastards so I don’t give money to them anymore.
It made me think of how I use search engines and most of the time I go on the same websites so I try to avoid search engines.
I use Mojeek with their focus feature (it is like lenses of Kagi). If I really need a search engine I use Mojeek with no focus, but most of the time the results are not good enough so I give them a feedback and go back on Duckduckgo.
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•Which Linux tool or command is surprisingly simple, powerful, and yet underrated?"
18·11 months agoDiscovered about rg recently and it is cool!
I do not have the solution to your problem but I may have a hint. I had this exact problem years ago. The only thing I recall is that there is a difference between sleep and hibernate and maybe your computer goes in hibernation mode. Try disabling it to see if the cause is sleep mode or hibernate mode (or both).
Sorry I don’t have the solution. If you find it, let us know!
Edit: you may want to look at this https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html
Oh no! Haven’t seen this! Thanks a lot. I’m gonna look at krohnkite then I guess.
Edit: installed and it works fine except for borders but I found a workaround ! 😊
KDE with Polonium for Window Management because I want tiling but still looking for a better way to get tiling into KDE. If someone knows.
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•Tell one thing that you miss after switching from another OS to Linux.
8·1 year agoBeing able to play League of Legends. We could until few months ago.
ClusterBomb@lemmy.blahaj.zoneto
Asklemmy@lemmy.ml•What are your favorite shows and why?
111·1 year agoMy top 5 is :
Arcane
Mr. Robot
Breaking Bad
The Good Place
Stranger Things
ClusterBomb@lemmy.blahaj.zoneto
Asklemmy@lemmy.ml•What movie would have ended at the beginning if the people in it acted like normal people?
22·1 year agoAlien.
“Waow what the f-!”
“- DON’T KILL IT!”
*kills it* “- Sorry, you were saying?”Still can’t figure why they didn’t kill it when they had opportunity. 😬
ClusterBomb@lemmy.blahaj.zoneto
Asklemmy@lemmy.ml•To people who choose not to swear (for non-religious reasons), what is your motivation to be that way ?
3·1 year agoI wish I could stop. I bannished a lot of words from my language because they are insults which come from oppressive language sucheas words to insult sex workers or homosexuals. Of course, most of people don’t use them with homophobic motives but the fact that they are insults is really bad imo.
ClusterBomb@lemmy.blahaj.zoneto
Asklemmy@lemmy.ml•What features and/or technologies would u like to see in a web browser ?
3·1 year agoA limit of data that can be used daily and we can track how much data we consume.
A little discrete “progress bar” at the bottom of the toolbar would be cool to see in the blink of an eye where I am on my daily limit.
ClusterBomb@lemmy.blahaj.zoneto
Privacy@lemmy.ml•[Solved] Looking for a privacy oriented fitness tracker
1·2 years agoI’m not sure to get it, sorry if it is not what you’ve been looking for but would this https://github.com/SamR1/FitTrackee work ?
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•I need a distro that can work right out the box without too much hassle to configure it, which one would you recommend?
1·2 years agoNever tried Mint. If you try it, tell me how good or bad you think it is ! 😊
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•I need a distro that can work right out the box without too much hassle to configure it, which one would you recommend?
4·2 years agoDon’t know which one to recommend but I would never recommend Ubuntu. It is full of bugs to me. I used it for years without issues but now it is impossible for me. Installed it on my girlfriend’s laptop recently and she has the same bugs I had years ago when I dropped it : network disconnects randomly and she has to reboot, bluetooth won’t reconnect sometimes… I can help but it is definitely not working out of the box for users who are not into tech.
ClusterBomb@lemmy.blahaj.zoneto
Linux@lemmy.ml•How often do you contribute to open source projects?
5·2 years agoI am a dev but I always find it hard to get into the code of opensource projects so I am never able to contribute. I hope I can understand how to figure this one day.



I know, I was trying to josh 😭 you almost did it though! Doing this also allow to find about words you don’t know!