linux basic commands
tecmint.com
-
👉 fdupes – A Command Line Tool to Find and Delete Duplicate Files in Linux
- 💻 (Resolved) Please install all available updates for your release before upgrading
cd /etc/apt/sources.list.d for i in *.list; do sudo mv ${i} ${i}.disabled; done - How to make tree output only directories
tree -d tree -d <target_directory> tree -d -L 2 . tree -d -L 3 home/downloads/ - 👉 Commands to find disk usage of files and directories
du -h downloads/ du -ah downloads/ du -mh downloads/ du -mh --max-depth=1 downloads/ find . -type f -exec du --human {} + | sort --human find . -type f -exec du --human {} + | sort --human --reverse find . -type f -exec du --human {} + | sort --human --reverse | head - 👉 Sorted output for du -h Commands to find disk usage cyberciti.biz
du -mh --max-depth=1 downloads/ | sort -h du -mh --max-depth=1 downloads/ | sort -h -r du --human-readable --max-depth=1 downloads/ | sort --human-numeric-sort -r du -h | sort -h | head du -h | sort -hr | head du --human-readable | sort --human-numeric-sort | head du --human-readable | sort --human-numeric-sort -r | head - 👉 Merge two pdf files side by side in a command line here
- Joining PDFs with Linux command line by Judith Roth
pdfunite *.pdf output.pdf sudo apt install texlive-extra-utils - 👉 Split files, note the naming scheme
pdfseparate File1.pdf temp-%04d-file1.pdf pdfseparate File2.pdf temp-%04d-file2.pdf - 👉 Combine the final pdf
pdfjam temp-*-*.pdf --nup 2x1 --landscape --outfile File1+2.pdf pdfjam temp-*-*.pdf --nup 3x2 --delta '{-20mm 0mm}' --landscape --outfile File1+2.pdf pdfjam temp-*-*.pdf --nup 3x2 --paper 'a0paper' --delta '{-80mm 0mm}' --landscape --outfile File1+2.pdf - 👉 Adding WaterMarks to pdf here and here
pdftk survivor.pdf background watermark.pdf output survivor_watermarked.pdf pdftk original.pdf stamp watermark.pdf output final.pdf - How to reverse the page order of a PDF file unix
qpdf --empty --pages infile.pdf z-1 -- outfile.pdf - Displace Days and time for history command here and here
echo 'HISTTIMEFORMAT="%F %T "' >> ~/.bashrc - 👉 /etc/apt/sources.list
Example of /etc/apt/sources.list Ubuntu 18.04 here
- 👉 Some useful commands Copying a Directory with SCP and here
rsync -avz <path to files to copy files from> <path to copy files to>
scp <path to files to copy files from> <path to copy files to>
head filename
cat filename
tail filename
-
10 Useful du (Disk Usage) Commands to Find Disk Usage of Files and Directories here
-
How To Clear Shell History In Ubuntu Linux here
-
Manage files effectively using head, tail and cat commands in Linux here
- searching a word or a variable using grep command
grep -r "n_ice_group" * grep -r "1.35634" * - How to rename multiple files on Linux here
mmv "*Log_Likelihood_direction_*" "#1Log_Likelihood_direction_scan_event_11_#2" -
Bash Scripting Tutorial for Beginners here
- Dumping the output file in a
python file >> output.txt
👉 How to submit interactive job on many file
condor_submit -interactive -a request_gpus=1
eval $(/cvmfs/icecube.opensciencegrid.org/py3-v4.1.1/setup.sh)
/data/p-one/twagiray/trackreco/build/env-shell.sh
cd /data/p-one/twagiray/reco_track_baseline/llh_scan
run_job.sh
#!/bin/bash
pyfile=PATH/python_file.py
gcd=PATH/gcd_file.i3.gz
infile=PATH/i3file_*.i3.gz
outfile=PATH
for file in $infile
do
python $pyfile -g $gcd -i $file -o $outfile/name.i3.gz
done
bash run_job.sh >> outfile.txt
Enjoy Reading This Article?
Here are some more articles you might like to read next: