jeltsch's blog

How much disk space do I have left (disk usage du and disk free df)

To see how much disk space you have left use df -h The h flag is for "human readable". Otherwise you get the size in 1k blocks. To see how much space a directory is using type du -hs h is again for human readable and s means summary - meaning only the total size is given. Without s you get recursively the size of every file below the directory.

Execution of dd command via ssh and output redirection to local file

I wanted to copy a whole encrypted partition over the network into a file. You can execute many commands via ssh, but occasionally there are problems to direct the output where you want it. E.g. the "more" command doesn't output to standard out when used via ssh. You need to use "less" to get the file content displayed locally (at least using a RedHat 8 remote machine). With dd you cannot use the "dd if=input of=output" syntax but you need the "dd < input > output" syntax.

smbclient (mount, Windows XP, SFS, file sharing)

Since I always use some GUIs, I don't really remember anymore how to connect to a Windows machine via the command line. smbclient -L windowshost shows you the shares that are available. Often, you you cannot browse them without a login/password for that windows machine, therefore you need to type smbclient -L windowshost -U username And occasionally the netbios name doesn't work either and you need to replace it by the IP address.

Pages