0

I'm trying to learn how to use the at command and to do that I tried to run the pwd command, but it seems that nothing happens:

enter image description here

How can I run a command like pwd by using at?

Gennaro Arguzzi
  • 763
  • 4
  • 14
  • 30
  • What was it supposed to do according to you? – muru Mar 08 '21 at 10:38
  • Hello @muru I expect that the command at prints (now) the current path because I specified pwd. Did I misunderstand the goal of the command? – Gennaro Arguzzi Mar 08 '21 at 10:40
  • Well, yes. At runs the command at some time in the future; it doesn't run it on the terminal where you ran at - that terminal might not even be around at that future time. Where will it print to? – muru Mar 08 '21 at 10:41
  • @muru how can I see the output of the command? – Gennaro Arguzzi Mar 08 '21 at 10:43
  • See https://unix.stackexchange.com/a/82838/70524 - if you have mailing set up, the output is mailed. Otherwise if the command runs long enough, try https://askubuntu.com/a/894889/158442 while it is running – muru Mar 08 '21 at 10:46

1 Answers1

2

Output is not made in your current terminal window. You need to send it somewhere. For example to a log file, via Email, ...

pwd >> pwd.log

Then you can check the output:

cat pwd.log
#or
tail -f pwd.log
pLumo
  • 28,011
  • 2
  • 65
  • 97