$HOME $USERNAME $PWD $USER $PATH $PYTHONPATH
unset HISTFILE && exit
or
history -c && history -w && exit
https://www.cyberciti.biz/faq/clear-the-shell-history-in-ubuntu-linux/
to run something as root
sudo <command> [command options]
to run interactively as root
sudo -i
to run something as someone else
sudo -i -u <username>
run exit
to leave that session
To change the file in place:
sed -i "s/regex/replace/" file
or
sed -i "s|regex|replace|" file
To copy output to a new file
sed "s/regex/replace/" filein > fileout
from here
#chown -R <owner> <folder_1> <folder_2> ... <folder_n>
chown -R user /home/user
source: https://devconnected.com/how-to-count-files-in-directory-on-linux/
ls | wc -l
stat /path/to/filename
stat -c '%A %a %n' /path/to/filename
printenv | grep ROS
From here
see the last few lines
#tail -100 <filename>
tail -100 history.txt
see real-time changes to files as they get appended:
tail -f history.txt
see line 196-200 of a file
head -200 history.txt | tail -5
from here
tree /path/to/dir
awk '{print $1}' <filename>
cat <filename> | awk '{print $1}'
awk -E , '{print $1}' <filename.csv>