ok an alias is simply an appreviation (ll) of a longer command (ls -lah –color) defined in one of those files:
user@Debian8:~$ bash -l; # simulates a login 1. hello from /etc/bash.bashrc 2. hello from /etc/profile 7. hello from ~/.bash_profile user@Debian8:~$ logout (Shortcut/Hotkey: Ctrl+D) 8. hello from ~/.bash_logout
usually /etc/bash.bashrc is the default global/system-wide (for all users) file to define system-wide aliases.
this user’s one starts like this:
vim /etc/bash.bashrc ... crazy stuff that the OS put there... # ========================== custom settings # seamless integration of vim in less, simply press v in less to edit the current file export VISUAL=vim export EDITOR="$VISUAL" # vim:ts=4:sw=4 # ============== config basics # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias grep="grep --color" # this will give the (imho) pretty usefull date format # drwxr-xr-x 5 ownedbyuser ownedbygroup 4.0K 2022-07-23 11:21 foldername export TIME_STYLE=long-iso # add some colors alias ll="ls -lah --color" # sort by date alias ll_latest="ls -tlah --color --time-style=+%F" # including timestamp alias ll_full_time="ls -lah --color --full-time" # give current date and time alias datum="date '+DATE: %Y-%m-%d TIME: %H:%M:%S'"
creditz:
https://unix.stackexchange.com/questions/275728/set-ls-l-time-format
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!