get the full path of a file
Turn a file's name into its whole path from /, through links if you want.
files
steps
-
realpath file.txtits absolute path, links resolved
-
readlink -f file.txtthe same, on older systems
-
echo "$PWD/file.txt"this folder's path plus the name
-
find "$PWD" -name '*.txt'every .txt file under here, with full paths
-
pwdthe folder you are in
commands used
realpathreadlinkpwd
Each has a page in lore: lore realpath opens it.
add to the end of a file
Add lines to a file without replacing it, also to a file only root can write.
argument list too long
"Argument list too long" from rm, cp or mv: too many files for one command line. Hand them over in batches.
change permissions of a folder and everything in it
Give a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
check a file's permissions
See who may read, write and run a file or a folder, and why a path is refused.