Command line
Generate a new SSH key
ssh-keygen -t rsa -C "your_email@example.com"
SCP File transfer
scp xxx.blah name@ip:/home/blah/xxxxx
Get ssh-agent to run
eval ssh-agent bash
ssh-add ~/.ssh/
ps -e | grep [s]sh-agent
eval ssh-agent bash
ssh-add -l
Tar and UnTar
Unzip
tar –zxvf file.tar
Zip
tar –zcvf file.tar /folder/path
Symlinks
source: 'How can I symlink a file in Linux? - Stack Overflow'
in the folder you want to link from eg courses/ and data is in /STAGE
REMOVE EXISTING FOLDER
rm -rf foldername
ln -s original course123
ln -s /home/user/webs/scorm_courses/STAGE/x course123
ln -s EXISTING_FILE SYMLINK_FILE
Cron
View Crons
crontab -l
edit crons
crontab -e
# m h dom mon dow command
0,10,20,30,40,45,50,55 * * * * wget -q http://www.wordpresssite.org/cron.php > /dev/null && rm cron.php >/dev/null 2>&1
Determine total directory/folder file size'
The command du "summarizes disk usage of each FILE, recursively for directories," e.g.,
du -hs /path/to/directory
-h is to get the numbers "human readable", e.g. get 140M instead of 143260 (size in KBytes) -s is for summary (otherwise you'll get not only the size of the folder but also for everything in the folder separately)
For a quick view:
du | sort -n
lists all directories with the largest last.
du --max-depth=1 * | sort -n
or, again, avoiding the redundant * :
du --max-depth=1 | sort -n
Links
File management
- ranger file browser
- the_silver_searcher searching
- pandoc file converter
- aria2 download manager
Git browsing
oh-my-zsh
- zgen plugin manager for zsh
productivity
- taskwarrior todo
- khal calendar
video
- [autosub](https://github.com/agermanidis/autosub](https://github.com/agermanidis/autosub) Command-line utility for auto-generating subtitles for any video file
chat
reading
Created on: 12th October, 2022
Last updated: 13th October, 2022